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.
This commit is contained in:
Brad King 2009-04-08 09:21:57 -04:00
parent d72743928e
commit cd532b6132

View File

@ -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)