summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/RunCTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-14 16:05:56 (GMT)
committerBrad King <brad.king@kitware.com>2022-11-14 16:05:56 (GMT)
commit3b6c1c1a3b8c32738ac351b8cd5c137f65e14c40 (patch)
tree8decf793c42724dda87424f75f7c17039f32e2d0 /Tests/RunCMake/RunCTest.cmake
parent7a4673965fbea65a22456a039145c489831fea8f (diff)
downloadCMake-3b6c1c1a3b8c32738ac351b8cd5c137f65e14c40.zip
CMake-3b6c1c1a3b8c32738ac351b8cd5c137f65e14c40.tar.gz
CMake-3b6c1c1a3b8c32738ac351b8cd5c137f65e14c40.tar.bz2
Tests: Factor out RunCMake ctest environment isolation
Some RunCMake tests unset some environment variables that affect ctest's behavior before running it. Any test using the RunCTest helper needs to do this, so do it in the helper itself. Issue: #24153
Diffstat (limited to 'Tests/RunCMake/RunCTest.cmake')
-rw-r--r--Tests/RunCMake/RunCTest.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCTest.cmake b/Tests/RunCMake/RunCTest.cmake
index 59db395..86f5b3a 100644
--- a/Tests/RunCMake/RunCTest.cmake
+++ b/Tests/RunCMake/RunCTest.cmake
@@ -1,5 +1,9 @@
include(RunCMake)
+# Isolate our ctest runs from external environment.
+unset(ENV{CTEST_PARALLEL_LEVEL})
+unset(ENV{CTEST_OUTPUT_ON_FAILURE})
+
function(run_ctest CASE_NAME)
configure_file(${RunCMake_SOURCE_DIR}/test.cmake.in
${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake @ONLY)