Tests: Unset CLICOLOR[_FORCE]

Ensure that the CLICOLOR[_FORCE] environment variables are not set when
running CMake's tests, as they cause especially RunCMake tests to
produce output that doesn't match the test expectations, resulting in
spurious test failures.
This commit is contained in:
Matthew Woehlke
2024-12-04 15:02:04 -05:00
parent d625c54141
commit 3a01e2005e

View File

@@ -29,6 +29,8 @@ if(NOT CTEST_CONFIGURATION_TYPE)
endif()
# Isolate tests from user configuration in the environment.
unset(ENV{CLICOLOR})
unset(ENV{CLICOLOR_FORCE})
unset(ENV{CMAKE_GENERATOR})
unset(ENV{CMAKE_GENERATOR_INSTANCE})
unset(ENV{CMAKE_GENERATOR_PLATFORM})