summaryrefslogtreecommitdiff
path: root/Tests/CTestUpdateCVS.cmake.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-04-08 09:21:57 -0400
committerBrad King <brad.king@kitware.com>2009-04-08 09:21:57 -0400
commitcd532b6132d49c3f170721e795c349655ea52098 (patch)
treeb25e9b675d3d49457246549d78e6bf10924b925c /Tests/CTestUpdateCVS.cmake.in
parentd72743928ef24af63ee972bd62bba66296890efa (diff)
downloadcmake-cd532b6132d49c3f170721e795c349655ea52098.tar.gz
ENH: Make UpdateCVS test robust to 1s file time res
CVS clients recognize file modifications only if a file's timestamp is newer than its CVS/Entries line. This fixes intermittent failure of the test on filesystems with low timestamp resolution by delaying before creating a local modification.
Diffstat (limited to 'Tests/CTestUpdateCVS.cmake.in')
-rw-r--r--Tests/CTestUpdateCVS.cmake.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in
index 91672e15d6..a85653bed0 100644
--- a/Tests/CTestUpdateCVS.cmake.in
+++ b/Tests/CTestUpdateCVS.cmake.in
@@ -102,6 +102,13 @@ run_child(
COMMAND ${CVSCMD} up -rRevision1
)
+# Delay 1 second so the modification produces a newer time stamp.
+find_program(SLEEP sleep)
+if(SLEEP)
+ message("Delaying...")
+ execute_process(COMMAND ${SLEEP} 1)
+endif()
+
# Create a modified file.
modify_content(user-source)