diff options
author | Brad King <brad.king@kitware.com> | 2022-11-14 16:08:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-14 16:08:45 (GMT) |
commit | e46a9d79fcbe3d46f9bb977f5031ecdc78ac2480 (patch) | |
tree | 6909c7636ed931f6558a93fb811857ed0d29ad29 | |
parent | 3b6c1c1a3b8c32738ac351b8cd5c137f65e14c40 (diff) | |
download | CMake-e46a9d79fcbe3d46f9bb977f5031ecdc78ac2480.zip CMake-e46a9d79fcbe3d46f9bb977f5031ecdc78ac2480.tar.gz CMake-e46a9d79fcbe3d46f9bb977f5031ecdc78ac2480.tar.bz2 |
Tests: Isolate more RunCMake cases from external ctest environment values
Fix a few RunCMake cases that were running `ctest` without isolating it
from external environment values that affect its behavior.
Fixes: #24153
-rw-r--r-- | Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake index 1c7b836..5bd0158 100644 --- a/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMakePresetsTest/RunCMakeTest.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}) + # Presets do not support legacy VS generator name architecture suffix. if(RunCMake_GENERATOR MATCHES "^(Visual Studio [0-9]+ [0-9]+) ") set(RunCMake_GENERATOR "${CMAKE_MATCH_1}") diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake index 695f562..b494cef 100644 --- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.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}) + if(RunCMake_GENERATOR STREQUAL "Borland Makefiles" OR RunCMake_GENERATOR STREQUAL "Watcom WMake") set(fs_delay 3) diff --git a/Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake b/Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake index 72056ae..74795c2 100644 --- a/Tests/RunCMake/test_include_dirs/RunCMakeTest.cmake +++ b/Tests/RunCMake/test_include_dirs/RunCMakeTest.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_TID) # Use a single build tree for a few tests without cleaning. set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TID-build) |