diff --git a/compiler-rt/test/asan/Unit/lit.site.cfg.py.in b/compiler-rt/test/asan/Unit/lit.site.cfg.py.in --- a/compiler-rt/test/asan/Unit/lit.site.cfg.py.in +++ b/compiler-rt/test/asan/Unit/lit.site.cfg.py.in @@ -62,5 +62,5 @@ # Set LD_LIBRARY_PATH to pick dynamic runtime up properly. push_ld_library_path(config, config.compiler_rt_libdir) -if config.host_os == 'Darwin': - config.parallelism_group = config.darwin_sanitizer_parallelism_group_func +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py --- a/compiler-rt/test/lit.common.cfg.py +++ b/compiler-rt/test/lit.common.cfg.py @@ -613,8 +613,8 @@ # Only run up to 3 processes that require shadow memory simultaneously on # 64-bit Darwin. Using more scales badly and hogs the system due to # inefficient handling of large mmap'd regions (terabytes) by the kernel. - elif config.target_arch in ['x86_64', 'x86_64h']: - lit_config.warning('Throttling sanitizer tests that require shadow memory on Darwin 64bit') + else: + lit_config.warning('Throttling sanitizer tests that require shadow memory on Darwin') lit_config.parallelism_groups['shadow-memory'] = 3 # Multiple substitutions are necessary to support multiple shared objects used diff --git a/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.py.in b/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.py.in --- a/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.py.in +++ b/compiler-rt/test/sanitizer_common/Unit/lit.site.cfg.py.in @@ -13,5 +13,5 @@ "sanitizer_common", "tests") config.test_source_root = config.test_exec_root -if config.host_os == 'Darwin': - config.parallelism_group = config.darwin_sanitizer_parallelism_group_func +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' diff --git a/compiler-rt/test/tsan/Unit/lit.site.cfg.py.in b/compiler-rt/test/tsan/Unit/lit.site.cfg.py.in --- a/compiler-rt/test/tsan/Unit/lit.site.cfg.py.in +++ b/compiler-rt/test/tsan/Unit/lit.site.cfg.py.in @@ -12,9 +12,10 @@ config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/tsan/tests" config.test_source_root = config.test_exec_root -if config.host_os == 'Darwin': - config.parallelism_group = config.darwin_sanitizer_parallelism_group_func +if not config.parallelism_group: + config.parallelism_group = 'shadow-memory' +if config.host_os == 'Darwin': # On Darwin, we default to ignore_noninstrumented_modules=1, which also # suppresses some races the tests are supposed to find. See tsan/lit.cfg.py. if 'TSAN_OPTIONS' in config.environment: diff --git a/compiler-rt/unittests/lit.common.unit.cfg.py b/compiler-rt/unittests/lit.common.unit.cfg.py --- a/compiler-rt/unittests/lit.common.unit.cfg.py +++ b/compiler-rt/unittests/lit.common.unit.cfg.py @@ -50,13 +50,3 @@ # # rdar://80086125 config.environment['MallocNanoZone'] = '0' - - # The test config gets pickled and sent to multiprocessing workers, and that - # only works for code if it is stored at the top level of some module. - # Therefore, we have to put the code in a .py file, add it to path, and import - # it to store it in the config. - import site - site.addsitedir(os.path.dirname(__file__)) - import lit_unittest_cfg_utils - config.darwin_sanitizer_parallelism_group_func = \ - lit_unittest_cfg_utils.darwin_sanitizer_parallelism_group_func diff --git a/compiler-rt/unittests/lit_unittest_cfg_utils.py b/compiler-rt/unittests/lit_unittest_cfg_utils.py deleted file mode 100644 --- a/compiler-rt/unittests/lit_unittest_cfg_utils.py +++ /dev/null @@ -1,4 +0,0 @@ -# Put all 64-bit tests in the shadow-memory parallelism group. We throttle those -# in our common lit config (lit.common.unit.cfg.py). -def darwin_sanitizer_parallelism_group_func(test): - return "shadow-memory" if "x86_64" in test.file_path else None