From b94afc19ebccb77ad3140386d11920bd8885f2ed Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Thu, 2 Apr 2020 12:58:47 -0700 Subject: [PATCH] iOS simulator testing: replace `simctl bootstatus` with boot+shutdown rdar://59643443 --- .../test/sanitizer_common/ios_commands/iossim_prepare.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py b/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py index 1a350006c33f..0cfec6b5777b 100755 --- a/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py +++ b/compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py @@ -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