llvm.org GIT mirror llvm / 356dcac
[lit] Add a test suite for lit itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173999 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 6 years ago
2 changed file(s) with 41 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 # -*- Python -*-
1
2 import os
3
4 # Configuration file for the 'lit' test runner.
5
6 # name: The name of this test suite.
7 config.name = 'lit'
8
9 # testFormat: The test format to use to interpret tests.
10 config.test_format = lit.formats.ShTest(execute_external=False)
11
12 # suffixes: A list of file extensions to treat as test files.
13 config.suffixes = ['.py']
14
15 # excludes: A list of individual files to exclude.
16 config.excludes = ['Inputs']
17
18 # test_source_root: The root path where tests are located.
19 config.test_source_root = os.path.dirname(__file__)
20 config.test_exec_root = config.test_source_root
21
22 config.target_triple = None
23
24 src_root = os.path.join(config.test_source_root, '..')
25 config.substitutions.append(('%{src_root}', src_root))
26 config.substitutions.append(('%{inputs}', os.path.join(
27 src_root, 'tests', 'Inputs')))
28 config.substitutions.append(('%{lit}', os.path.join(src_root, 'lit.py')))
29
30 # Enable coverage.py reporting, assuming the coverage module has been installed
31 # and sitecustomize.py in the virtualenv has been modified appropriately.
32 if lit.params.get('check-coverage', None):
33 config.environment['COVERAGE_PROCESS_START'] = os.path.join(
34 os.path.dirname(__file__), ".coveragerc")
0 # Basic sanity check that usage works.
1 #
2 # RUN: %{lit} --help > %t.out
3 # RUN: FileCheck < %t.out %s
4 #
5 # CHECK: Usage: lit.py [options] {file-or-path}