瀏覽代碼

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 年之前
父節點
當前提交
cd532b6132
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Tests/CTestUpdateCVS.cmake.in

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