diff options
author | Brad King <brad.king@kitware.com> | 2010-02-09 18:31:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-02-09 18:31:40 (GMT) |
commit | 6e7e71e9b97b7041f283b4a755c6baffeabca12f (patch) | |
tree | 604c5c20fac39490cf1ac15c9450deeb514cd4d9 /Tests/CTestUpdateGIT.cmake.in | |
parent | 8bd231866afcae6aa8edb2d9df5f574bb017c0ed (diff) | |
download | CMake-6e7e71e9b97b7041f283b4a755c6baffeabca12f.zip CMake-6e7e71e9b97b7041f283b4a755c6baffeabca12f.tar.gz CMake-6e7e71e9b97b7041f283b4a755c6baffeabca12f.tar.bz2 |
Teach CTest.UpdateGIT test to fake file timestamp
We wrap the git executable in a shell script that touches one source
file after 'git pull'. This makes the file newer than the index even
though it has not actually changed. If CTest does not refresh the index
properly then the test will fail with a bogus modified file.
Diffstat (limited to 'Tests/CTestUpdateGIT.cmake.in')
-rw-r--r-- | Tests/CTestUpdateGIT.cmake.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 8b10600..c721bb4 100644 --- a/Tests/CTestUpdateGIT.cmake.in +++ b/Tests/CTestUpdateGIT.cmake.in @@ -25,6 +25,12 @@ set(AUTHOR_CONFIG "[user] message("Creating test directory...") init_testing() +if(UNIX) + set(src "@CMAKE_CURRENT_SOURCE_DIR@") + configure_file(${src}/CTestUpdateGIT.sh.in ${TOP}/git.sh @ONLY) + set(GIT ${TOP}/git.sh) +endif() + #----------------------------------------------------------------------------- # Create the repository. message("Creating repository...") |