diff options
Diffstat (limited to 'Tests/RunCMake/ctest_test/TestRepeatUntilFail.cmake')
-rw-r--r-- | Tests/RunCMake/ctest_test/TestRepeatUntilFail.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/ctest_test/TestRepeatUntilFail.cmake b/Tests/RunCMake/ctest_test/TestRepeatUntilFail.cmake new file mode 100644 index 0000000..5eb0d8a --- /dev/null +++ b/Tests/RunCMake/ctest_test/TestRepeatUntilFail.cmake @@ -0,0 +1,9 @@ +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(COUNT EQUAL 2) + message(FATAL_ERROR "this test fails on the 2nd run") +endif() |