Skip to content

Commit c6fbd12

Browse files
authored
[orc-rt] Fix unit tests. (#154469)
orc-rt/test/unit/lit.site.cfg.py.in was pointing to the lit.cfg.py file for the regression tests, causing the `check-orc-rt-unit` target to re-run the regression tests rather than running the unit tests.
1 parent 18e6cfd commit c6fbd12

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

orc-rt/test/unit/lit.cfg.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@
99

1010
from lit.llvm import llvm_config
1111

12-
# name: The name of this test suite.
1312
config.name = "ORC-RT-Unit"
14-
15-
# suffixes: A list of file extensions to treat as test files.
16-
config.suffixes = []
17-
18-
# test_source_root: The root path where tests are located.
19-
# test_exec_root: The root path where tests should be run.
13+
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests")
2014
config.test_exec_root = os.path.join(config.orc_rt_obj_root, "unittests")
2115
config.test_source_root = config.test_exec_root
22-
23-
# testFormat: The test format to use to interpret tests.
24-
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests")

orc-rt/test/unit/lit.site.cfg.py.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import sys
44

55
config.llvm_src_root = "@LLVM_SOURCE_DIR@"
66
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
7+
config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
78
config.orc_rt_obj_root = "@ORC_RT_BINARY_DIR@"
89
config.host_triple = "@LLVM_HOST_TRIPLE@"
910
config.target_triple = "@LLVM_TARGET_TRIPLE@"
@@ -13,4 +14,4 @@ config.llvm_tools_dir = "@ORC_RT_LLVM_TOOLS_DIR@"
1314
import lit.llvm
1415
lit.llvm.initialize(lit_config, config)
1516
# Let the main config do the real work.
16-
lit_config.load_config(config, "@ORC_RT_SOURCE_DIR@/test/lit.cfg.py")
17+
lit_config.load_config(config, "@ORC_RT_SOURCE_DIR@/test/unit/lit.cfg.py")

0 commit comments

Comments
 (0)