浏览代码

Fix CTestTestScheduler sporadic failure.

Increased the time difference between each test so that overburdened systems won't fail this test sometimes.
Zach Mullen 15 年之前
父节点
当前提交
d80323bccd
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      Tests/CMakeLists.txt
  2. 2 2
      Tests/CTestTestScheduler/CMakeLists.txt
  3. 2 2
      Tests/CTestTestScheduler/sleep.c

+ 1 - 1
Tests/CMakeLists.txt

@@ -1305,7 +1305,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
     --output-log "${CMake_BINARY_DIR}/Tests/CTestTestScheduler/testOutput.log"
     )
   SET_TESTS_PROPERTIES(CTestTestScheduler PROPERTIES
-    PASS_REGULAR_EXPRESSION "Start 1.*Start 2.*Start 3.*Start 4.*Start 5.*Start 5.*Start 4.*Start 3.*Start 2.*Start 1")
+    PASS_REGULAR_EXPRESSION "Start 1.*Start 2.*Start 3.*Start 4.*Start 4.*Start 3.*Start 2.*Start 1")
 
   CONFIGURE_FILE(
     "${CMake_SOURCE_DIR}/Tests/CTestTestStopTime/test.cmake.in"

+ 2 - 2
Tests/CTestTestScheduler/CMakeLists.txt

@@ -4,6 +4,6 @@ INCLUDE (CTest)
 
 ADD_EXECUTABLE (Sleep sleep.c)
 
-FOREACH (time RANGE 1 5)
+FOREACH (time RANGE 1 4)
   ADD_TEST (TestSleep${time} Sleep ${time})
-ENDFOREACH (time RANGE 1 5)
+ENDFOREACH (time RANGE 1 4)

+ 2 - 2
Tests/CTestTestScheduler/sleep.c

@@ -4,13 +4,13 @@
 # include <unistd.h>
 #endif
 
-/* sleeps for 2n seconds, where n is the argument to the program */
+/* sleeps for 4n seconds, where n is the argument to the program */
 int main(int argc, char** argv)
 {
   int time;
   if(argc > 1)
     {
-    time = 3 * atoi(argv[1]);
+    time = 4 * atoi(argv[1]);
     }
 #if defined(_WIN32)
   Sleep(time * 1000);