summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-10-14 17:32:46 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-10-14 17:32:46 (GMT)
commit2137955138d7d97fbd2e0dc1ef16a844552a101e (patch)
treedaebeb97d3805f2af71164974b53fcaa7806c5c8 /Tests/CMakeLists.txt
parent85b2f936d6faf4ad5fba7a1d6f44131aa19ef590 (diff)
downloadCMake-2137955138d7d97fbd2e0dc1ef16a844552a101e.zip
CMake-2137955138d7d97fbd2e0dc1ef16a844552a101e.tar.gz
CMake-2137955138d7d97fbd2e0dc1ef16a844552a101e.tar.bz2
Increase ctest coverage. Add tests that intentionally call ctest_submit without any drop location so that the submits fail. Call for each possible type of submit. Also use the launchers from these scripts.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt27
1 files changed, 26 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index f21efd7..aa1f607 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1111,7 +1111,32 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
PASS_REGULAR_EXPRESSION "\\*\\*\\*Timeout")
ADD_TEST(CTestTestShowOnly ${CMAKE_CTEST_COMMAND} -N)
-
+
+
+ function(add_failed_submit_test name source build in out log regex)
+ configure_file("${in}" "${out}" @ONLY)
+ add_test(${name} ${CMAKE_CTEST_COMMAND} -S "${out}" -V --output-log "${log}")
+ set_tests_properties(${name} PROPERTIES PASS_REGULAR_EXPRESSION "${regex}")
+ endfunction()
+
+ set(regex "(Problems when submitting via S*CP")
+ set(regex "${regex}|Error message was: ")
+ set(regex "${regex}(Couldn.t resolve host ")
+ set(regex "${regex}|libcurl was built with SSL disabled. https: not supported)")
+ set(regex "${regex}|Submission method .xmlrpc. not compiled into CTest)")
+
+ foreach(drop_method cp ftp http https scp xmlrpc)
+ add_failed_submit_test(CTestTestFailedSubmit-${drop_method}
+ "${CMake_SOURCE_DIR}/Tests/CTestTest/SmallAndFast"
+ "${CMake_BINARY_DIR}/Tests/CTestTestFailedSubmits/${drop_method}"
+ "${CMake_SOURCE_DIR}/Tests/CTestTestFailedSubmits/test.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestFailedSubmits/test-${drop_method}.cmake"
+ "${CMake_BINARY_DIR}/Tests/CTestTestFailedSubmits/test-${drop_method}.log"
+ "${regex}"
+ )
+ endforeach()
+
+
IF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestTest/test.cmake.in"
"${CMake_BINARY_DIR}/Tests/CTestTest/test.cmake" @ONLY ESCAPE_QUOTES)