3 # Configuration file for the 'lit' test runner.
10 # name: The name of this test suite.
11 config
.name
= "LLD-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
.lld_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(config
.llvm_build_mode
, "Tests")
24 # Propagate the temp directory. Windows requires this because it uses \Windows\
25 # if none of these are present.
26 if "TMP" in os
.environ
:
27 config
.environment
["TMP"] = os
.environ
["TMP"]
28 if "TEMP" in os
.environ
:
29 config
.environment
["TEMP"] = os
.environ
["TEMP"]
31 # Propagate HOME as it can be used to override incorrect homedir in passwd
32 # that causes the tests to fail.
33 if "HOME" in os
.environ
:
34 config
.environment
["HOME"] = os
.environ
["HOME"]
36 # Win32 seeks DLLs along %PATH%.
37 if sys
.platform
in ["win32", "cygwin"] and os
.path
.isdir(config
.shlibdir
):
38 config
.environment
["PATH"] = os
.path
.pathsep
.join((
39 config
.shlibdir
, config
.environment
["PATH"]))
41 # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
42 if sys
.platform
== "win32" and "SYSTEMDRIVE" in os
.environ
:
43 config
.environment
["SYSTEMDRIVE"] = os
.environ
["SYSTEMDRIVE"]
45 # Expand the LLD source path so that unittests can use associated input files.
46 # (see AsLibELF/ROCm.cpp test)
47 config
.environment
["LLD_SRC_DIR"] = config
.lld_src_dir