forked from Xilinx/triSYCL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlit.cfg
More file actions
55 lines (43 loc) · 1.9 KB
/
Copy pathlit.cfg
File metadata and controls
55 lines (43 loc) · 1.9 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
54
55
import os
import shutil
import lit.formats
# Configuration file for the 'lit' test runner.
# name: The name of this test suite.
config.name = 'triSYCL'
# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.ShTest(execute_external=False)
# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.cpp']
### excludes: A list of individual files to exclude.
##config.excludes = ['Inputs']
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
config.test_exec_root = config.test_source_root
config.target_triple = '(unused)'
src_root = os.path.join(config.test_source_root, '..')
config.environment['PYTHONPATH'] = src_root
config.substitutions.append(('%{src_root}', src_root))
config.substitutions.append(('%{inputs}', os.path.join(
src_root, 'tests', 'Inputs')))
config.substitutions.append(('%{lit}', "%%{python} %s" % (
os.path.join(src_root, 'lit.py'),)))
# To use %{execute}%s in the test files to launch make with the right
# Makefile from the top test directory
config.substitutions.append(('%{execute}',
"make -f " + config.test_source_root
+ "/Makefile execute TARGET="))
# To use %{filecheck} as the FileCheck from the running system because in
# Debian FileCheck from llvm-3.6-tools is named FileCheck-3.6 for example
for version in [ "", "-3.6", "-3.5", "-3.4" ]:
filecheck_name = "FileCheck" + version
# This require at least Python 3.3
if shutil.which(filecheck_name):
# Found it
break
# This will fail here if FileCheck was not found at this level
config.substitutions.append(('%{filecheck}', filecheck_name))
# Forward the FORCE_CXX environment variable to the test and so to the
# Makefile:
if 'FORCE_CXX' in os.environ:
config.environment['FORCE_CXX'] = os.environ['FORCE_CXX']
print (config.environment)