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
This commit is contained in:
Brad King
2022-11-14 11:08:45 -05:00
parent 3b6c1c1a3b
commit e46a9d79fc
3 changed files with 12 additions and 0 deletions

View File

@@ -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}")

View File

@@ -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)

View File

@@ -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)