Debian Codegraph @

clang-tools-extra/pseudo/test/Unit/lit.cfg.py

raw
1 import lit.formats
2
3 config.name = "clangPseudo Unit Tests"
4 config.test_format = lit.formats.GoogleTest(".", "Tests")
5 config.test_source_root = config.clang_pseudo_binary_dir + "/unittests"
6 config.test_exec_root = config.clang_pseudo_binary_dir + "/unittests"
7
8 # Point the dynamic loader at dynamic libraries in 'lib'.
9 # FIXME: it seems every project has a copy of this logic. Move it somewhere.
10 import platform
11
12 if platform.system() == "Darwin":
13 shlibpath_var = "DYLD_LIBRARY_PATH"
14 elif platform.system() == "Windows":
15 shlibpath_var = "PATH"
16 else:
17 shlibpath_var = "LD_LIBRARY_PATH"
18 config.environment[shlibpath_var] = os.path.pathsep.join(
19 ("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
20 )
21
22 # It is not realistically possible to account for all options that could
23 # possibly be present in system and user configuration files, so disable
24 # default configs for the test runs.
25 config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"