diff options
author | Brad King <brad.king@kitware.com> | 2015-03-23 13:18:26 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-03-23 13:18:26 (GMT) |
commit | cc8b8cdc751ff2dfa6e77a69da542d6aef066346 (patch) | |
tree | 53088db771ef7cebaf89157fe4b081e4417a74b2 /Tests/RunCMake/CTestCommandLine/test1.cmake | |
parent | d67196d0e8c5e9feb99d3a609d060f52ad8b9a59 (diff) | |
parent | 6bce027662588b972602e2e74c16a1883ed853cf (diff) | |
download | CMake-cc8b8cdc751ff2dfa6e77a69da542d6aef066346.zip CMake-cc8b8cdc751ff2dfa6e77a69da542d6aef066346.tar.gz CMake-cc8b8cdc751ff2dfa6e77a69da542d6aef066346.tar.bz2 |
Merge topic 'ctest-repeat-until-fail'
6bce0276 Help: Add notes for topic 'ctest-repeat-until-fail'
fde70a1b ctest: Add a new --repeat-until-fail option
Diffstat (limited to 'Tests/RunCMake/CTestCommandLine/test1.cmake')
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/test1.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/test1.cmake b/Tests/RunCMake/CTestCommandLine/test1.cmake new file mode 100644 index 0000000..eeae7a2 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/test1.cmake @@ -0,0 +1,13 @@ +# This is run by test test1 in repeat-until-fail-cmake.cmake with cmake -P. +# It reads the file TEST_OUTPUT_FILE and increments the number +# found in the file by 1. When the number is 2, then the +# code sends out a cmake error causing the test to fail +# the second time it is run. +message("TEST_OUTPUT_FILE = ${TEST_OUTPUT_FILE}") +file(READ "${TEST_OUTPUT_FILE}" COUNT) +message("COUNT= ${COUNT}") +math(EXPR COUNT "${COUNT} + 1") +file(WRITE "${TEST_OUTPUT_FILE}" "${COUNT}") +if(${COUNT} EQUAL 2) + message(FATAL_ERROR "this test fails on the 2nd run") +endif() |