Skip to content

Commit 76dd642

Browse files
add cfg file
1 parent ec7b905 commit 76dd642

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test/Unit/lit.site.cfg.py.in

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@LIT_SITE_CFG_IN_HEADER@
2+
3+
import sys
4+
import os
5+
import subprocess
6+
7+
import lit.formats
8+
9+
config.offloadtest_obj_root = path(r"@OFFLOADTEST_BINARY_DIR@")
10+
config.offloadtest_src_root = path(r"@OFFLOADTEST_SOURCE_DIR@")
11+
config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
12+
config.gtest_run_under = lit_config.substitute(r"@LLVM_GTEST_RUN_UNDER@")
13+
14+
# name: The name of this test suite.
15+
config.name = "OffloadTest-Unit"
16+
17+
# suffixes: A list of file extensions to treat as test files.
18+
config.suffixes = []
19+
20+
# test_source_root: The root path where tests are located.
21+
# test_exec_root: The root path where tests should be run.
22+
config.test_exec_root = os.path.join(config.offloadtest_obj_root, "unittests")
23+
config.test_source_root = config.test_exec_root
24+
25+
# testFormat: The test format to use to interpret tests.
26+
config.test_format = lit.formats.GoogleTest(
27+
config.llvm_build_mode,
28+
"Tests",
29+
run_under=config.gtest_run_under,
30+
)

0 commit comments

Comments
 (0)