[PATCH] D71449: [iOS sim] Ensure simulator device is booted in iossim_prepare.py

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 13:48:02 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd1783db9dbda: [iOS sim] Ensure simulator device is booted in iossim_prepare.py (authored by yln).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71449/new/

https://reviews.llvm.org/D71449

Files:
  compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py


Index: compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py
===================================================================
--- compiler-rt/test/sanitizer_common/ios_commands/iossim_prepare.py
+++ 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": {}}))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71449.234975.patch
Type: text/x-patch
Size: 812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191220/ffa321ac/attachment.bin>


More information about the llvm-commits mailing list