Daniel Dunbar | 40722cc | 2013-01-31 00:21:39 +0000 | [diff] [blame] | 1 | # -*- Python -*- |
| 2 | |
| 3 | import os |
| 4 | |
Daniel Dunbar | 72868c7 | 2013-08-09 21:39:17 +0000 | [diff] [blame^] | 5 | import lit.formats |
| 6 | |
Daniel Dunbar | 40722cc | 2013-01-31 00:21:39 +0000 | [diff] [blame] | 7 | # Configuration file for the 'lit' test runner. |
| 8 | |
| 9 | # name: The name of this test suite. |
| 10 | config.name = 'lit' |
| 11 | |
| 12 | # testFormat: The test format to use to interpret tests. |
| 13 | config.test_format = lit.formats.ShTest(execute_external=False) |
| 14 | |
| 15 | # suffixes: A list of file extensions to treat as test files. |
| 16 | config.suffixes = ['.py'] |
| 17 | |
| 18 | # excludes: A list of individual files to exclude. |
| 19 | config.excludes = ['Inputs'] |
| 20 | |
| 21 | # test_source_root: The root path where tests are located. |
| 22 | config.test_source_root = os.path.dirname(__file__) |
| 23 | config.test_exec_root = config.test_source_root |
| 24 | |
| 25 | config.target_triple = None |
| 26 | |
| 27 | src_root = os.path.join(config.test_source_root, '..') |
Daniel Dunbar | 25baa13 | 2013-01-31 01:23:26 +0000 | [diff] [blame] | 28 | config.environment['PYTHONPATH'] = src_root |
Daniel Dunbar | 40722cc | 2013-01-31 00:21:39 +0000 | [diff] [blame] | 29 | config.substitutions.append(('%{src_root}', src_root)) |
| 30 | config.substitutions.append(('%{inputs}', os.path.join( |
| 31 | src_root, 'tests', 'Inputs'))) |
| 32 | config.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 Dunbar | 72868c7 | 2013-08-09 21:39:17 +0000 | [diff] [blame^] | 36 | if lit_config.params.get('check-coverage', None): |
Daniel Dunbar | 40722cc | 2013-01-31 00:21:39 +0000 | [diff] [blame] | 37 | config.environment['COVERAGE_PROCESS_START'] = os.path.join( |
| 38 | os.path.dirname(__file__), ".coveragerc") |