blob: f148c911aac794d1db5d3a4cef931f373791f065 [file] [log] [blame]
Daniel Dunbar40722cc2013-01-31 00:21:39 +00001# -*- Python -*-
2
3import os
4
Daniel Dunbar72868c72013-08-09 21:39:17 +00005import lit.formats
6
Daniel Dunbar40722cc2013-01-31 00:21:39 +00007# Configuration file for the 'lit' test runner.
8
9# name: The name of this test suite.
10config.name = 'lit'
11
12# testFormat: The test format to use to interpret tests.
13config.test_format = lit.formats.ShTest(execute_external=False)
14
15# suffixes: A list of file extensions to treat as test files.
16config.suffixes = ['.py']
17
18# excludes: A list of individual files to exclude.
19config.excludes = ['Inputs']
20
21# test_source_root: The root path where tests are located.
22config.test_source_root = os.path.dirname(__file__)
23config.test_exec_root = config.test_source_root
24
25config.target_triple = None
26
27src_root = os.path.join(config.test_source_root, '..')
Daniel Dunbar25baa132013-01-31 01:23:26 +000028config.environment['PYTHONPATH'] = src_root
Daniel Dunbar40722cc2013-01-31 00:21:39 +000029config.substitutions.append(('%{src_root}', src_root))
30config.substitutions.append(('%{inputs}', os.path.join(
31 src_root, 'tests', 'Inputs')))
32config.substitutions.append(('%{lit}', os.path.join(src_root, 'lit.py')))
33
34# Enable coverage.py reporting, assuming the coverage module has been installed
35# and sitecustomize.py in the virtualenv has been modified appropriately.
Daniel Dunbar72868c72013-08-09 21:39:17 +000036if lit_config.params.get('check-coverage', None):
Daniel Dunbar40722cc2013-01-31 00:21:39 +000037 config.environment['COVERAGE_PROCESS_START'] = os.path.join(
38 os.path.dirname(__file__), ".coveragerc")