1# -*- Python -*- 2 3# Configuration file for the 'lit' test runner. 4 5import os 6import subprocess 7 8import lit.formats 9 10# name: The name of this test suite. 11config.name = 'LLVM-Unit' 12 13# suffixes: A list of file extensions to treat as test files. 14config.suffixes = [] 15 16# is_early; Request to run this suite early. 17config.is_early = True 18 19# test_source_root: The root path where tests are located. 20# test_exec_root: The root path where tests should be run. 21config.test_exec_root = os.path.join(config.llvm_obj_root, 'unittests') 22config.test_source_root = config.test_exec_root 23 24# testFormat: The test format to use to interpret tests. 25config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests') 26 27# Propagate the temp directory. Windows requires this because it uses \Windows\ 28# if none of these are present. 29if 'TMP' in os.environ: 30 config.environment['TMP'] = os.environ['TMP'] 31if 'TEMP' in os.environ: 32 config.environment['TEMP'] = os.environ['TEMP'] 33 34# Propagate path to symbolizer for ASan/MSan. 35for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']: 36 if symbolizer in os.environ: 37 config.environment[symbolizer] = os.environ[symbolizer] 38 39# Win32 seeks DLLs along %PATH%. 40if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir): 41 config.environment['PATH'] = os.path.pathsep.join(( 42 config.shlibdir, config.environment['PATH'])) 43 44# Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate. 45if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ: 46 config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE'] 47