3 # Configuration file for the 'lit' test runner.
10 # name: The name of this test suite.
11 config
.name
= "LLVM-Unit"
13 # suffixes: A list of file extensions to treat as test files.
16 # test_source_root: The root path where tests are located.
17 # test_exec_root: The root path where tests should be run.
18 config
.test_exec_root
= os
.path
.join(config
.llvm_obj_root
, "unittests")
19 config
.test_source_root
= config
.test_exec_root
21 # testFormat: The test format to use to interpret tests.
22 config
.test_format
= lit
.formats
.GoogleTest(
23 config
.llvm_build_mode
,
25 run_under
=config
.gtest_run_under
,
28 # Propagate the temp directory. Windows requires this because it uses \Windows\
29 # if none of these are present.
30 if "TMP" in os
.environ
:
31 config
.environment
["TMP"] = os
.environ
["TMP"]
32 if "TEMP" in os
.environ
:
33 config
.environment
["TEMP"] = os
.environ
["TEMP"]
35 # Propagate HOME as it can be used to override incorrect homedir in passwd
36 # that causes the tests to fail.
37 if "HOME" in os
.environ
:
38 config
.environment
["HOME"] = os
.environ
["HOME"]
40 # Propagate sanitizer options.
42 "ASAN_SYMBOLIZER_PATH",
43 "HWASAN_SYMBOLIZER_PATH",
44 "MSAN_SYMBOLIZER_PATH",
45 "TSAN_SYMBOLIZER_PATH",
46 "UBSAN_SYMBOLIZER_PATH",
55 config
.environment
[var
] = os
.environ
[var
]
57 # Win32 seeks DLLs along %PATH%.
58 if sys
.platform
in ["win32", "cygwin"] and os
.path
.isdir(config
.shlibdir
):
59 config
.environment
["PATH"] = os
.path
.pathsep
.join(
60 (config
.shlibdir
, config
.environment
["PATH"])
63 # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propagate.
64 if sys
.platform
== "win32" and "SYSTEMDRIVE" in os
.environ
:
65 config
.environment
["SYSTEMDRIVE"] = os
.environ
["SYSTEMDRIVE"]