• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@LIT_SITE_CFG_IN_HEADER@
2
3import os
4
5# Load common config for all compiler-rt unit tests.
6lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
7
8def 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
12
13# Setup config name.
14config.name = 'AddressSanitizer-Unit'
15
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.
19if @ASAN_TEST_DYNAMIC@:
20  test_dir = "dynamic"
21else:
22  test_dir = "default"
23config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@",
24                                     "lib", "asan", "tests", test_dir)
25
26config.test_source_root = config.test_exec_root
27
28# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
29push_ld_library_path(config, config.compiler_rt_libdir)
30