• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# -*- Python -*-
2
3import os
4
5# Configuration file for the 'lit' test runner.
6
7# name: The name of this test suite.
8config.name = 'lit'
9
10# testFormat: The test format to use to interpret tests.
11config.test_format = lit.formats.ShTest(execute_external=False)
12
13# suffixes: A list of file extensions to treat as test files.
14config.suffixes = ['.py']
15
16# excludes: A list of individual files to exclude.
17config.excludes = ['Inputs']
18
19# test_source_root: The root path where tests are located.
20config.test_source_root = os.path.dirname(__file__)
21config.test_exec_root = config.test_source_root
22
23config.target_triple = None
24
25src_root = os.path.join(config.test_source_root, '..')
26config.environment['PYTHONPATH'] = src_root
27config.substitutions.append(('%{src_root}', src_root))
28config.substitutions.append(('%{inputs}', os.path.join(
29            src_root, 'tests', 'Inputs')))
30config.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.
34if lit.params.get('check-coverage', None):
35    config.environment['COVERAGE_PROCESS_START'] = os.path.join(
36        os.path.dirname(__file__), ".coveragerc")
37