diff options
author | Brad King <brad.king@kitware.com> | 2015-09-21 13:25:24 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-09-21 13:25:24 (GMT) |
commit | 82a0c7be3f6a00119f3ba00b0d1a4f73cbbb140c (patch) | |
tree | 88c11a1cfd7d22ec16d0abda2937c9fbc2b5dff8 /Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | |
parent | 358b56414563d2100bbbb6e482e8441d29fa8f55 (diff) | |
parent | fd47df45030733341858fa33ee96015d64c73c03 (diff) | |
download | CMake-82a0c7be3f6a00119f3ba00b0d1a4f73cbbb140c.zip CMake-82a0c7be3f6a00119f3ba00b0d1a4f73cbbb140c.tar.gz CMake-82a0c7be3f6a00119f3ba00b0d1a4f73cbbb140c.tar.bz2 |
Merge topic 'ctest-custom-output-size'
fd47df45 CTest: Add options to limit output of passed and failed tests
6e3151f6 CTest: Document and test custom output size settings
Diffstat (limited to 'Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index dfc1e33..00895cc 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -108,3 +108,20 @@ run_TestLoad(test-load-invalid 'two') run_TestLoad(test-load-pass 10) unset(ENV{__CTEST_FAKE_LOAD_AVERAGE_FOR_TESTING}) + +function(run_TestOutputSize) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestOutputSize) + 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(PassingTest \"${CMAKE_COMMAND}\" -E echo PassingTestOutput) + add_test(FailingTest \"${CMAKE_COMMAND}\" -E no_such_command) +") + run_cmake_command(TestOutputSize + ${CMAKE_CTEST_COMMAND} -M Experimental -T Test + --test-output-size-passed 10 + --test-output-size-failed 12 + ) +endfunction() +run_TestOutputSize() |