diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py --- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py +++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py @@ -1,5 +1,17 @@ #!/usr/bin/python -import os, sys, subprocess, json +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.') + +boot_cmd = ['xcrun', 'simctl', 'bootstatus', device_id, '-b'] +subprocess.check_call(boot_cmd) +# TODO(rdar58118442): we start the simulator here, but we never tear it down + print(json.dumps({"env": {}}))