diff options
author | Brad King <brad.king@kitware.com> | 2009-04-08 13:21:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-04-08 13:21:57 (GMT) |
commit | cd532b6132d49c3f170721e795c349655ea52098 (patch) | |
tree | b25e9b675d3d49457246549d78e6bf10924b925c | |
parent | d72743928ef24af63ee972bd62bba66296890efa (diff) | |
download | CMake-cd532b6132d49c3f170721e795c349655ea52098.zip CMake-cd532b6132d49c3f170721e795c349655ea52098.tar.gz CMake-cd532b6132d49c3f170721e795c349655ea52098.tar.bz2 |
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.
-rw-r--r-- | Tests/CTestUpdateCVS.cmake.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in index 91672e1..a85653b 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) |