iOS simulator testing: replace `simctl bootstatus` with boot+shutdown

rdar://59643443
This commit is contained in:
Julian Lettner 2020-04-02 12:58:47 -07:00
parent 022f1e2cc8
commit b94afc19eb
1 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,9 @@ 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.')
boot_cmd = ['xcrun', 'simctl', 'bootstatus', device_id, '-b']
subprocess.check_call(boot_cmd)
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