Repository navigation
Expand file tree
/
Copy pathlit.cfg
More file actions
53 lines (37 loc) · 1.57 KB
/
Copy pathlit.cfg
File metadata and controls
53 lines (37 loc) · 1.57 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
# -*- Python -*-
import os
import platform
import subprocess
import lit
import lit.formats
import lit.util
### Helper Functions
def make_path(*args):
return os.path.normpath(os.path.join(*args))
kIsWindows = platform.system() == 'Windows'
###
config.name = 'bloaty'
bloaty_src_root = getattr(config, 'bloaty_src_root', None)
if not bloaty_src_root:
lit_config.fatal("missing 'bloaty_src_root' key in the site specific config")
bloaty_src_root = os.path.normpath(bloaty_src_root)
bloaty_obj_root = getattr(config, 'bloaty_obj_root', None)
if not bloaty_obj_root:
lit_config.fatal("missing 'bloaty_obj_root' key in the site specific config")
bloaty_obj_root = os.path.normpath(bloaty_obj_root)
if not lit_config.params.get('bloaty', None):
lit_config.fatal("missing parameter 'bloaty'")
lit_config.note('Using bloaty: {}'.format(lit_config.params['bloaty']))
lit_config.note('Using FileCheck: {}'.format(config.filecheck_path))
lit_config.note('Using yaml2obj: {}'.format(config.yaml2obj_path))
use_lit_shell = os.environ.get('LIT_USE_INTERNAL_SHELL', kIsWindows)
if not use_lit_shell:
config.available_features.add('shell')
config.test_format = lit.formats.ShTest(execute_external = False)
config.suffixes = ['.test']
config.excludes = ['testdata']
config.test_source_root = os.path.join(bloaty_src_root, 'tests')
config.test_exec_root = os.path.join(bloaty_obj_root, 'tests')
config.substitutions.append(('%FileCheck', config.filecheck_path))
config.substitutions.append(('%yaml2obj', config.yaml2obj_path))
config.substitutions.append(('%bloaty', lit_config.params['bloaty']))