summaryrefslogtreecommitdiffstats
path: root/Tests/EnforceConfig.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-24 17:15:33 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-24 17:15:33 (GMT)
commit1d6e7ed71ffab4f2716353da08eafab0f3398c8a (patch)
tree6e45cf241122cf4b0a170f55a364af546bf43f98 /Tests/EnforceConfig.cmake.in
parent0ae07800557bef97c43ddd64f144b258b8fdd5dc (diff)
downloadCMake-1d6e7ed71ffab4f2716353da08eafab0f3398c8a.zip
CMake-1d6e7ed71ffab4f2716353da08eafab0f3398c8a.tar.gz
CMake-1d6e7ed71ffab4f2716353da08eafab0f3398c8a.tar.bz2
Improve fake $HOME test isolation code
The commit "Fake $HOME to isolate tests from user" started setting $HOME in the CTest script environment. On some platforms tests depend on some local configuration in the home directory, such as the "cvs login" for KWSys in CTestTest3. In this commit we now construct a fake home dir during CMake config step and populate it with a .cvspass file needed by the test. We also check CTEST_NO_TEST_HOME to optionally disable the test home. See issue #9949.
Diffstat (limited to 'Tests/EnforceConfig.cmake.in')
-rw-r--r--Tests/EnforceConfig.cmake.in7
1 files changed, 1 insertions, 6 deletions
diff --git a/Tests/EnforceConfig.cmake.in b/Tests/EnforceConfig.cmake.in
index 9a5f042..b2101f8 100644
--- a/Tests/EnforceConfig.cmake.in
+++ b/Tests/EnforceConfig.cmake.in
@@ -28,9 +28,4 @@ IF(NOT CTEST_CONFIGURATION_TYPE AND CONFIG_REQUIRED)
MESSAGE("Guessing configuration ${CTEST_CONFIGURATION_TYPE}")
ENDIF(NOT CTEST_CONFIGURATION_TYPE AND CONFIG_REQUIRED)
-# Fake a user home directory to avoid polluting the real one.
-IF(DEFINED ENV{HOME})
- SET(HOME "@CMake_BINARY_DIR@/Tests/CMakeFiles/TestHome")
- FILE(MAKE_DIRECTORY "${HOME}")
- SET(ENV{HOME} "${HOME}")
-ENDIF(DEFINED ENV{HOME})
+@TEST_HOME_ENV_CODE@