[Cmake-commits] [cmake-commits] king committed CTestUpdateGIT.cmake.in 1.3 1.4 CTestUpdateGIT.sh.in NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Feb 9 13:31:42 EST 2010
Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv14646/Tests
Modified Files:
CTestUpdateGIT.cmake.in
Added Files:
CTestUpdateGIT.sh.in
Log Message:
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.
Index: CTestUpdateGIT.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestUpdateGIT.cmake.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** CTestUpdateGIT.cmake.in 1 Sep 2009 19:41:43 -0000 1.3
--- CTestUpdateGIT.cmake.in 9 Feb 2010 18:31:40 -0000 1.4
***************
*** 26,29 ****
--- 26,35 ----
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.
--- NEW FILE: CTestUpdateGIT.sh.in ---
#!/bin/sh
if test "x$1" = "xpull"; then
"@GIT@" "$@" && sleep 1 && touch foo.txt
else
exec "@GIT@" "$@"
fi
More information about the Cmake-commits
mailing list