diff options
author | Brad King <brad.king@kitware.com> | 2015-10-26 17:12:50 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-26 17:12:50 (GMT) |
commit | f054552124bfffce3b15c3422ceb39acec9b8b6a (patch) | |
tree | 2458e3a60146e917d1870648d708a9c0b172975e /Tests/RunCMake | |
parent | 8e86e113bc738cf3cce13991ff6208305f950206 (diff) | |
parent | e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9 (diff) | |
download | CMake-f054552124bfffce3b15c3422ceb39acec9b8b6a.zip CMake-f054552124bfffce3b15c3422ceb39acec9b8b6a.tar.gz CMake-f054552124bfffce3b15c3422ceb39acec9b8b6a.tar.bz2 |
Merge topic 'fix-test-RUN_SERIAL-failure-regression'
e61973e1 CTest: Fix regression in handling of a RUN_SERIAL test that fails
Diffstat (limited to 'Tests/RunCMake')
4 files changed, 27 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 00895cc..2bc3693 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -78,6 +78,21 @@ endfunction() run_LabelCount() +function(run_SerialFailed) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SerialFailed) + 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" " +add_test(NoSuchCommand no_such_command) +set_tests_properties(NoSuchCommand PROPERTIES RUN_SERIAL ON) +add_test(Echo \"${CMAKE_COMMAND}\" -E echo \"EchoTest\") +") + + run_cmake_command(SerialFailed ${CMAKE_CTEST_COMMAND} -V) +endfunction() +run_SerialFailed() + function(run_TestLoad name load) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestLoad) set(RunCMake_TEST_NO_CLEAN 1) diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt new file mode 100644 index 0000000..cafe565 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt @@ -0,0 +1 @@ +Unable to find executable: no_such_command diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt new file mode 100644 index 0000000..d7144f7 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt @@ -0,0 +1,10 @@ +Could not find executable no_such_command +.* +2/2 Test #2: Echo ............................. Passed +[0-9.]+ sec ++ +50% tests passed, 1 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests FAILED: +[ ]+1 - NoSuchCommand \(Not Run\)$ |