[compiler-rt] r323026 - Force lit to execute the ASan and TSan tests on iOS devices

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 18:07:30 PST 2018


Author: delcypher
Date: Fri Jan 19 18:07:30 2018
New Revision: 323026

URL: http://llvm.org/viewvc/llvm-project?rev=323026&view=rev
Log:
Force lit to execute the ASan and TSan tests on iOS devices
sequentially.

The current implementation of commands in
`test/sanitizer_common/ios_commands/` for iOS devices cannot be executed
in parallel which results in the ASan and TSan tests failing when
executed in parallel by lit which was the default behaviour.

We now force the ASan and TSan tests to be a new parallelism group named
`darwin-ios-device-sanitizer` which allows only one test to be run at a
time.  We also emit a warning informing the user that tests are being
run sequentially.

This only applies if the target is an iOS device.

Differential Revision: https://reviews.llvm.org/D42156

Modified:
    compiler-rt/trunk/test/asan/lit.cfg
    compiler-rt/trunk/test/lit.common.cfg
    compiler-rt/trunk/test/tsan/lit.cfg

Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=323026&r1=323025&r2=323026&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Fri Jan 19 18:07:30 2018
@@ -212,5 +212,8 @@ else:
 if config.host_os not in ['Linux', 'Darwin', 'FreeBSD', 'SunOS', 'Windows']:
   config.unsupported = True
 
-if config.host_os == 'Darwin' and config.target_arch in ["x86_64", "x86_64h"]:
-  config.parallelism_group = "darwin-64bit-sanitizer"
+if config.host_os == 'Darwin':
+  if config.target_arch in ["x86_64", "x86_64h"]:
+    config.parallelism_group = "darwin-64bit-sanitizer"
+  elif config.ios and not config.iossim:
+    config.parallelism_group = "darwin-ios-device-sanitizer"

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=323026&r1=323025&r2=323026&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Fri Jan 19 18:07:30 2018
@@ -291,6 +291,14 @@ if platform.system() == 'Windows':
 if platform.system() == 'Darwin':
   lit_config.parallelism_groups["darwin-64bit-sanitizer"] = 3
 
+# The current implementation of the tools in sanitizer_common/ios_comamnds
+# do not support parallel execution so force sequential execution of the
+# tests on iOS devices.
+if config.host_os == 'Darwin' and config.ios and not config.iossim:
+  lit_config.warning("iOS device test cases being run sequentially")
+  lit_config.parallelism_groups["darwin-ios-device-sanitizer"] = 1
+
+
 if config.host_os == 'Darwin':
   config.substitutions.append( ("%ld_flags_rpath_exe", '-Wl,-rpath, at executable_path/ %dynamiclib') )
   config.substitutions.append( ("%ld_flags_rpath_so", '-install_name @rpath/`basename %dynamiclib`') )

Modified: compiler-rt/trunk/test/tsan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/lit.cfg?rev=323026&r1=323025&r2=323026&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/lit.cfg (original)
+++ compiler-rt/trunk/test/tsan/lit.cfg Fri Jan 19 18:07:30 2018
@@ -85,5 +85,8 @@ if config.host_os not in ['FreeBSD', 'Li
 if config.android:
   config.unsupported = True
 
-if config.host_os == 'Darwin' and config.target_arch in ["x86_64", "x86_64h"]:
-  config.parallelism_group = "darwin-64bit-sanitizer"
+if config.host_os == 'Darwin':
+  if config.target_arch in ["x86_64", "x86_64h"]:
+    config.parallelism_group = "darwin-64bit-sanitizer"
+  elif config.ios and not config.iossim:
+    config.parallelism_group = "darwin-ios-device-sanitizer"




More information about the llvm-commits mailing list