bazelbuild / bazelbuild/rules_apple
How to best cleanup simulators after test timeout?
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
We were running into an issue where non-reused simulators would end getting left over when hosted iOS unit tests timed out. We have a patch that combines the trap handler that cleans up `test_tmp_dir` with a call to `xcrun simctl delete` to clean up single-use simulators, but it doesn't seem like a particularly scalable solution.
It'd be nice to formalize calling into `clean_up_simulator_action_binary` when test timeouts happen and how that cleanup script could detect that the test timed out.
Contributor guide
Research direction
Start by reading the existing test_tmp_dir trap handler and clean_up_simulator_action_binary, then inspect how hosted iOS unit-test timeouts are handled. Compare the proposed xcrun simctl delete approach with the cleanup action entry point. Done means timed-out tests reliably trigger single-use simulator cleanup without leaving simulators behind.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios
- Domain
- mobile-dev, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100