2015-03-06 00:51:10 +03:00
|
|
|
include(RunCMake)
|
|
|
|
|
2015-04-19 23:17:44 +03:00
|
|
|
unset(ENV{CTEST_PARALLEL_LEVEL})
|
|
|
|
unset(ENV{CTEST_OUTPUT_ON_FAILURE})
|
|
|
|
|
2015-03-06 00:51:10 +03:00
|
|
|
run_cmake_command(repeat-until-fail-bad1
|
|
|
|
${CMAKE_CTEST_COMMAND} --repeat-until-fail
|
|
|
|
)
|
|
|
|
run_cmake_command(repeat-until-fail-bad2
|
|
|
|
${CMAKE_CTEST_COMMAND} --repeat-until-fail foo
|
|
|
|
)
|
|
|
|
run_cmake_command(repeat-until-fail-good
|
|
|
|
${CMAKE_CTEST_COMMAND} --repeat-until-fail 2
|
|
|
|
)
|
|
|
|
|
|
|
|
function(run_repeat_until_fail_tests)
|
|
|
|
# Use a single build tree for a few tests without cleaning.
|
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/repeat-until-fail-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
|
|
|
|
run_cmake(repeat-until-fail-cmake)
|
|
|
|
run_cmake_command(repeat-until-fail-ctest
|
|
|
|
${CMAKE_CTEST_COMMAND} -C Debug --repeat-until-fail 3
|
|
|
|
)
|
|
|
|
endfunction()
|
|
|
|
run_repeat_until_fail_tests()
|
2015-05-07 17:43:58 +03:00
|
|
|
|
|
|
|
function(run_BadCTestTestfile)
|
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/BadCTestTestfile)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
|
|
|
|
subdirs()
|
|
|
|
")
|
|
|
|
|
|
|
|
run_cmake_command(BadCTestTestfile ${CMAKE_CTEST_COMMAND})
|
|
|
|
endfunction()
|
|
|
|
run_BadCTestTestfile()
|