summaryrefslogtreecommitdiff
path: root/test/lit.common.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.common.cfg')
-rw-r--r--test/lit.common.cfg11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/lit.common.cfg b/test/lit.common.cfg
index 4b03a5504..2f0dd6351 100644
--- a/test/lit.common.cfg
+++ b/test/lit.common.cfg
@@ -94,7 +94,16 @@ config.substitutions.append(
instead define '%clangXXX' substitution in lit config. ***\n\n""") )
# Allow tests to be executed on a simulator or remotely.
-config.substitutions.append( ('%run', config.emulator) )
+if config.emulator:
+ config.substitutions.append( ('%run', config.emulator) )
+elif config.ios:
+ device_id_env = "SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER" if config.iossim else "SANITIZER_IOS_TEST_DEVICE_IDENTIFIER"
+ if device_id_env in os.environ: config.environment[device_id_env] = os.environ[device_id_env]
+ ios_commands_dir = os.path.join(config.compiler_rt_src_root, "test", "sanitizer_common", "ios_commands")
+ run_wrapper = os.path.join(ios_commands_dir, "iossim_run.py" if config.iossim else "ios_run.py")
+ config.substitutions.append(('%run', run_wrapper))
+else:
+ config.substitutions.append( ('%run', "") )
# Define CHECK-%os to check for OS-dependent output.
config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_os)))