summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-07 16:27:48 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-07 19:21:18 (GMT)
commit28994115e83b568ccba546db26a55381cbad244d (patch)
tree1b109db3fddad3a96a4c8ac2b91917bc24a15ae4 /Tests/RunCMake/ctest_test/TestRepeatAfterTimeout.cmake
parent42d5d8f425e655a07d3dcb0802d90cb5c167b164 (diff)
downloadCMake-28994115e83b568ccba546db26a55381cbad244d.zip
CMake-28994115e83b568ccba546db26a55381cbad244d.tar.gz
CMake-28994115e83b568ccba546db26a55381cbad244d.tar.bz2
ctest_test: Add option to REPEAT tests
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()