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 # is_early; Request to run this suite early.
17 config
.is_early
= True
19 # test_source_root: The root path where tests are located.
20 # test_exec_root: The root path where tests should be run.
21 config
.test_exec_root
= os
.path
.join(config
.llvm_obj_root
, 'unittests')
22 config
.test_source_root
= config
.test_exec_root
24 # testFormat: The test format to use to interpret tests.
25 config
.test_format
= lit
.formats
.GoogleTest(config
.llvm_build_mode
, 'Tests')
27 # Propagate the temp directory. Windows requires this because it uses \Windows\
28 # if none of these are present.
29 if 'TMP' in os
.environ
:
30 config
.environment
['TMP'] = os
.environ
['TMP']
31 if 'TEMP' in os
.environ
:
32 config
.environment
['TEMP'] = os
.environ
['TEMP']
34 # Propagate HOME as it can be used to override incorrect homedir in passwd
35 # that causes the tests to fail.
36 if 'HOME' in os
.environ
:
37 config
.environment
['HOME'] = os
.environ
['HOME']
39 # Propagate path to symbolizer for ASan/MSan.
40 for symbolizer
in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
41 if symbolizer
in os
.environ
:
42 config
.environment
[symbolizer
] = os
.environ
[symbolizer
]
44 # Win32 seeks DLLs along %PATH%.
45 if sys
.platform
in ['win32', 'cygwin'] and os
.path
.isdir(config
.shlibdir
):
46 config
.environment
['PATH'] = os
.path
.pathsep
.join((
47 config
.shlibdir
, config
.environment
['PATH']))
49 # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
50 if sys
.platform
== 'win32' and 'SYSTEMDRIVE' in os
.environ
:
51 config
.environment
['SYSTEMDRIVE'] = os
.environ
['SYSTEMDRIVE']