summaryrefslogtreecommitdiffstats
path: root/Tests/CTestUpdateGIT.sh.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-02-09 18:31:40 (GMT)
committerBrad King <brad.king@kitware.com>2010-02-09 18:31:40 (GMT)
commit6e7e71e9b97b7041f283b4a755c6baffeabca12f (patch)
tree604c5c20fac39490cf1ac15c9450deeb514cd4d9 /Tests/CTestUpdateGIT.sh.in
parent8bd231866afcae6aa8edb2d9df5f574bb017c0ed (diff)
downloadCMake-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.sh.in')
-rwxr-xr-xTests/CTestUpdateGIT.sh.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CTestUpdateGIT.sh.in b/Tests/CTestUpdateGIT.sh.in
new file mode 100755
index 0000000..4761d32
--- /dev/null
+++ b/Tests/CTestUpdateGIT.sh.in
@@ -0,0 +1,6 @@
+#!/bin/sh
+if test "x$1" = "xpull"; then
+ "@GIT@" "$@" && sleep 1 && touch foo.txt
+else
+ exec "@GIT@" "$@"
+fi