• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 = 'MLIR-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.mlir_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 HOME as it can be used to override incorrect homedir in passwd
35# that causes the tests to fail.
36if 'HOME' in os.environ:
37    config.environment['HOME'] = os.environ['HOME']
38
39# Propagate path to symbolizer for ASan/MSan.
40for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
41    if symbolizer in os.environ:
42        config.environment[symbolizer] = os.environ[symbolizer]
43