1
0
Эх сурвалжийг харах

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.
Brad King 16 жил өмнө
parent
commit
cd532b6132

+ 7 - 0
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)