[PATCH] D51272: Give a better error message when trying to run the iossim tests and `SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER` is not set in the environment.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 3 01:41:27 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL341300: Give a better error message when trying to run the iossim tests and… (authored by delcypher, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D51272

Files:
  compiler-rt/trunk/test/lit.common.cfg


Index: compiler-rt/trunk/test/lit.common.cfg
===================================================================
--- compiler-rt/trunk/test/lit.common.cfg
+++ compiler-rt/trunk/test/lit.common.cfg
@@ -127,14 +127,18 @@
   ios_or_iossim = "iossim" if config.apple_platform.endswith("sim") else "ios"
 
   config.available_features.add('ios')
+  device_id_env = "SANITIZER_" + ios_or_iossim.upper() + "_TEST_DEVICE_IDENTIFIER"
   if ios_or_iossim == "iossim":
     config.available_features.add('iossim')
+    if device_id_env not in os.environ:
+      lit_config.fatal(
+        '{} must be set in the environment when running iossim tests'.format(
+          device_id_env))
   if config.apple_platform != "ios" and config.apple_platform != "iossim":
     config.available_features.add(config.apple_platform)
 
   ios_commands_dir = os.path.join(config.compiler_rt_src_root, "test", "sanitizer_common", "ios_commands")
 
-  device_id_env = "SANITIZER_" + ios_or_iossim.upper() + "_TEST_DEVICE_IDENTIFIER"
   run_wrapper = os.path.join(ios_commands_dir, ios_or_iossim + "_run.py")
   env_wrapper = os.path.join(ios_commands_dir, ios_or_iossim + "_env.py")
   compile_wrapper = os.path.join(ios_commands_dir, ios_or_iossim + "_compile.py")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51272.163670.patch
Type: text/x-patch
Size: 1238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180903/07171d0d/attachment.bin>


More information about the llvm-commits mailing list