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