xref: /llvm-project/compiler-rt/test/tsan/Unit/lit.site.cfg.py.in (revision a5228bcaad9c57e7ede95d900a730c59f5243d35)
1@LIT_SITE_CFG_IN_HEADER@
2
3# Load common config for all compiler-rt unit tests.
4lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
5
6# Setup config name.
7config.name = 'ThreadSanitizer-Unit'
8
9# Setup test source and exec root. For unit tests, we define
10# it as build directory with ASan unit tests.
11# FIXME: De-hardcode this path.
12config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/tsan/tests"
13config.test_source_root = config.test_exec_root
14
15if not config.parallelism_group:
16  config.parallelism_group = 'shadow-memory'
17
18if config.host_os == 'Darwin':
19  # On Darwin, we default to ignore_noninstrumented_modules=1, which also
20  # suppresses some races the tests are supposed to find.  See tsan/lit.cfg.py.
21  if 'TSAN_OPTIONS' in config.environment:
22    config.environment['TSAN_OPTIONS'] += ':ignore_noninstrumented_modules=0'
23  else:
24    config.environment['TSAN_OPTIONS'] = 'ignore_noninstrumented_modules=0'
25  config.environment['TSAN_OPTIONS'] += ':ignore_interceptors_accesses=0'
26