32760ceb2735387f15c179d8384e2f899c4fd403
[oota-llvm.git] / utils / lit / tests / lit.cfg
1 # -*- Python -*-
2
3 import os
4
5 # Configuration file for the 'lit' test runner.
6
7 # name: The name of this test suite.
8 config.name = 'lit'
9
10 # testFormat: The test format to use to interpret tests.
11 config.test_format = lit.formats.ShTest(execute_external=False)
12
13 # suffixes: A list of file extensions to treat as test files.
14 config.suffixes = ['.py']
15
16 # excludes: A list of individual files to exclude.
17 config.excludes = ['Inputs']
18
19 # test_source_root: The root path where tests are located.
20 config.test_source_root = os.path.dirname(__file__)
21 config.test_exec_root = config.test_source_root
22
23 config.target_triple = None
24
25 src_root = os.path.join(config.test_source_root, '..')
26 config.environment['PYTHONPATH'] = src_root
27 config.substitutions.append(('%{src_root}', src_root))
28 config.substitutions.append(('%{inputs}', os.path.join(
29             src_root, 'tests', 'Inputs')))
30 config.substitutions.append(('%{lit}', os.path.join(src_root, 'lit.py')))
31
32 # Enable coverage.py reporting, assuming the coverage module has been installed
33 # and sitecustomize.py in the virtualenv has been modified appropriately.
34 if lit.params.get('check-coverage', None):
35     config.environment['COVERAGE_PROCESS_START'] = os.path.join(
36         os.path.dirname(__file__), ".coveragerc")