diff options
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/MergeOutput-stdout.txt | 13 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/MergeOutput.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 13 |
3 files changed, 30 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/MergeOutput-stdout.txt b/Tests/RunCMake/CTestCommandLine/MergeOutput-stdout.txt new file mode 100644 index 0000000..af7cdc5 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/MergeOutput-stdout.txt @@ -0,0 +1,13 @@ +Test timeout computed to be: [^ +]+ +1: -- Output on stdout +1: Output on stderr +1: -- Output on stdout +1: Output on stderr +1: -- Output on stdout +1: Output on stderr +1: -- Output on stdout +1: Output on stderr +1: -- Output on stdout +1: Output on stderr +1/1 Test #1: MergeOutput diff --git a/Tests/RunCMake/CTestCommandLine/MergeOutput.cmake b/Tests/RunCMake/CTestCommandLine/MergeOutput.cmake new file mode 100644 index 0000000..528ac90 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/MergeOutput.cmake @@ -0,0 +1,4 @@ +foreach(i RANGE 1 5) + message(STATUS "Output on stdout") + message("Output on stderr") +endforeach() diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 0cb11ac..a3ce139 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -39,3 +39,16 @@ subdirs() run_cmake_command(BadCTestTestfile ${CMAKE_CTEST_COMMAND}) endfunction() run_BadCTestTestfile() + +function(run_MergeOutput) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/MergeOutput) + 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(MergeOutput \"${CMAKE_COMMAND}\" -P \"${RunCMake_SOURCE_DIR}/MergeOutput.cmake\") +") + + run_cmake_command(MergeOutput ${CMAKE_CTEST_COMMAND} -V) +endfunction() +run_MergeOutput() |