diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2009-09-18 16:16:46 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2009-09-18 16:16:46 (GMT) |
commit | 78e0bfa0fdd2376e89bb7750904db57b5c8bf104 (patch) | |
tree | 8201367a03986be0731ce330acf79921f0a61dd6 /Tests/CMakeLists.txt | |
parent | 311eb30672c7f098404a6511f71b930f8aad65d7 (diff) | |
download | CMake-78e0bfa0fdd2376e89bb7750904db57b5c8bf104.zip CMake-78e0bfa0fdd2376e89bb7750904db57b5c8bf104.tar.gz CMake-78e0bfa0fdd2376e89bb7750904db57b5c8bf104.tar.bz2 |
Added test coverage for ctest. Covers WILL_FAIL condition, tests that do not build, tests that segfault, and test executable not found (bad command), as well as some pass and fail regular expressions.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index f39f462..e57d322 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1047,6 +1047,39 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel -S "${CMake_BINARY_DIR}/Tests/CTestTest3/test.cmake" -V --output-log "${CMake_BINARY_DIR}/Tests/CTestTest3/testOutput.log" ) + + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestFailure/testNoBuild.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestFailure/testNoBuild.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestNoBuild ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestFailure/testNoBuild.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestFailure/testOut1.log" + ) + SET_TESTS_PROPERTIES(CTestTestNoBuild PROPERTIES WILL_FAIL 1) + + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestFailure/testNoExe.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestFailure/testNoExe.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestNoExe ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestFailure/testNoExe.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestFailure/testOut2.log" + ) + SET_TESTS_PROPERTIES(CTestTestNoExe PROPERTIES DEPENDS CTestTestNoBuild + PASS_REGULAR_EXPRESSION "Could not find executable" + FAIL_REGULAR_EXPRESSION "SegFault") + + CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Tests/CTestTestCrash/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestCrash/test.cmake" + @ONLY ESCAPE_QUOTES) + ADD_TEST(CTestTestCrash ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestCrash/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestCrash/testOutput.log" + ) + SET_TESTS_PROPERTIES(CTestTestCrash PROPERTIES + PASS_REGULAR_EXPRESSION "SegFault") ADD_TEST(CTestTestShowOnly ${CMAKE_CTEST_COMMAND} -N ) |