-
Notifications
You must be signed in to change notification settings - Fork 0
/
lit.cfg
41 lines (30 loc) · 1.4 KB
/
lit.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Configuration file for the 'lit' test runner.
import os
import lit.formats
# The name of this test suite.
config.name = 'avr-metal'
# The test format to use to interpret tests.
config.test_format = lit.formats.ShTest()
# A list of file extensions to treat as test files. This is overriden
# by individual lit.local.cfg files in the test subdirectories.
config.suffixes = ['.ll', '.mir', '.c', '.cpp']
# A list of directories to exclude from the testsuite. The 'Inputs'
# subdirectories contain auxiliary inputs for various tests in their parent
# directories.
config.excludes = []
config.avr_metal_root = os.path.dirname(__file__)
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.join(config.avr_metal_root, 'test')
# Attempt to load the environment settings from a CMake configure file we have.
environment_cfg = os.path.join(config.avr_metal_root, 'lit.environment.cfg')
if environment_cfg and os.path.exists(environment_cfg):
lit_config.load_config(config, environment_cfg)
else:
lit_config.fatal('No LLVM environment file present!')
raise SystemExit
# Tweak the PATH to include the tools dir.
path = os.path.pathsep.join((config.llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path
# We can only run avrlit tests if we have a board set up.
if 'AVRLIT_PORT' not in os.environ or 'AVRLIT_BOARD' not in os.environ:
config.unsupported = True