diff --git a/Tests/CTestUpdateGIT.cmake.in b/Tests/CTestUpdateGIT.cmake.in index 8b1060002..c721bb4e6 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...") diff --git a/Tests/CTestUpdateGIT.sh.in b/Tests/CTestUpdateGIT.sh.in new file mode 100755 index 000000000..4761d3293 --- /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