summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake')
-rw-r--r--Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake b/Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake
new file mode 100644
index 0000000..abde4f0
--- /dev/null
+++ b/Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake
@@ -0,0 +1,10 @@
+include("${COUNT_FILE}" OPTIONAL)
+if(NOT COUNT)
+ set(COUNT 0)
+endif()
+math(EXPR COUNT "${COUNT} + 1")
+file(WRITE "${COUNT_FILE}" "set(COUNT ${COUNT})\n")
+if(NOT COUNT EQUAL 2)
+ message("this test times out except on the 2nd run")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 10)
+endif()