Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[compiler-rt] Use --standalone when running tests on the iOS simulator
We can use `simctl spawn --standalone` to enable running tests without the need for an already-booted simulator instance. This also side-steps the problem of not having a good place to shutdown the instance after we are finished with testing. rdar://58118442 Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D78409
- Loading branch information
Julian Lettner
committed
Apr 20, 2020
1 parent
2737362
commit a54e18d
Showing
2 changed files
with
1 addition
and
14 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,5 @@ | ||
#!/usr/bin/python | ||
|
||
import json | ||
import os | ||
import subprocess | ||
|
||
|
||
device_id = os.environ.get('SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER') | ||
if not device_id: | ||
raise EnvironmentError('Specify SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER to select which simulator to use.') | ||
|
||
DEVNULL = open(os.devnull, 'w') | ||
subprocess.call(['xcrun', 'simctl', 'shutdown', device_id], stderr=DEVNULL) | ||
subprocess.check_call(['xcrun', 'simctl', 'boot', device_id]) | ||
# TODO(rdar58118442): we start the simulator here, but we never tear it down | ||
|
||
|
||
print(json.dumps({"env": {}})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters