1 @LIT_SITE_CFG_IN_HEADER@
5 # Load common config for all compiler-rt unit tests.
6 lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
8 def push_ld_library_path(config, new_path):
9 new_ld_library_path = os.path.pathsep.join(
10 (new_path, config.environment.get('LD_LIBRARY_PATH', '')))
11 config.environment['LD_LIBRARY_PATH'] = new_ld_library_path
14 config.name = 'AddressSanitizer-Unit'
16 # Setup test source and exec root. For unit tests, we define
17 # it as build directory with ASan unit tests.
18 # FIXME: De-hardcode this path.
19 if @ASAN_TEST_DYNAMIC@:
23 config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@",
24 "lib", "asan", "tests", test_dir)
26 config.test_source_root = config.test_exec_root
28 # Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
29 push_ld_library_path(config, config.compiler_rt_libdir)