Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,9 @@ if( LLVM_INCLUDE_EXAMPLES )
endif()

if( LLVM_INCLUDE_TESTS )
set(LLVM_GTEST_RUN_UNDER
"" CACHE STRING
"Define the wrapper program that LLVM unit tests should be run under.")
if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
include(LLVMExternalProjectUtils)
llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
Expand Down
6 changes: 5 additions & 1 deletion llvm/test/Unit/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
config.test_source_root = config.test_exec_root

# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, "Tests")
config.test_format = lit.formats.GoogleTest(
config.llvm_build_mode,
"Tests",
run_under=config.gtest_run_under,
)

# Propagate the temp directory. Windows requires this because it uses \Windows\
# if none of these are present.
Expand Down
1 change: 1 addition & 0 deletions llvm/test/Unit/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ config.llvm_obj_root = path(r"@LLVM_BINARY_DIR@")
config.llvm_tools_dir = lit_config.substitute(path(r"@LLVM_TOOLS_DIR@"))
config.llvm_build_mode = lit_config.substitute("@LLVM_BUILD_MODE@")
config.shlibdir = lit_config.substitute(path(r"@SHLIBDIR@"))
config.gtest_run_under = lit_config.substitute(r"@LLVM_GTEST_RUN_UNDER@")

# Let the main config do the real work.
lit_config.load_config(
Expand Down