diff options
author | Brad King <brad.king@kitware.com> | 2015-05-07 14:43:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-14 18:36:27 (GMT) |
commit | 3837c48334ff670d9132f80e35a31e263b21d3a1 (patch) | |
tree | fc4aeb33963eb8c5b87977ca8db3f6e507dc976b /Tests | |
parent | b317b38d3345a648c99a549e30cc50868e89c516 (diff) | |
download | CMake-3837c48334ff670d9132f80e35a31e263b21d3a1.zip CMake-3837c48334ff670d9132f80e35a31e263b21d3a1.tar.gz CMake-3837c48334ff670d9132f80e35a31e263b21d3a1.tar.bz2 |
Tests: Add case for 'ctest' run with bad CTestTestfile
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt new file mode 100644 index 0000000..d95bb33 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/BadCTestTestfile-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at CTestTestfile.cmake:[0-9]+ \(subdirs\): + subdirs called with incorrect number of arguments ++ +No tests were found!!!$ diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 22a8d20..0cb11ac 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -26,3 +26,16 @@ function(run_repeat_until_fail_tests) ) endfunction() run_repeat_until_fail_tests() + +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() |