diff options
author | Brad King <brad.king@kitware.com> | 2014-05-08 15:27:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-05-08 15:27:59 (GMT) |
commit | 65a71a5db2836096c6d6b58749d3c7b118b6b200 (patch) | |
tree | 8d894dca2a3a3fa4976f6d9d8207bd5be9c3881d /Tests | |
parent | 3e206022abede98b60c9932e50034e23ba677d0f (diff) | |
parent | 54111286453894beb69ad18a9361edc2a50efc84 (diff) | |
download | CMake-65a71a5db2836096c6d6b58749d3c7b118b6b200.zip CMake-65a71a5db2836096c6d6b58749d3c7b118b6b200.tar.gz CMake-65a71a5db2836096c6d6b58749d3c7b118b6b200.tar.bz2 |
Merge topic 'ctest-bad-generator'
54111286 ctest_build: Do not crash on bad generator name
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/CTestTestBadGenerator/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/CTestTestBadGenerator/CTestConfig.cmake | 7 | ||||
-rw-r--r-- | Tests/CTestTestBadGenerator/test.cmake.in | 20 |
4 files changed, 42 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9d642cc..fce7887 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2265,6 +2265,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release PASS_REGULAR_EXPRESSION "${CTestTestBadExe_REGEX}") configure_file( + "${CMake_SOURCE_DIR}/Tests/CTestTestBadGenerator/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestBadGenerator/test.cmake" + @ONLY ESCAPE_QUOTES) + add_test(CTestTestBadGenerator ${CMAKE_CTEST_COMMAND} + -C "\${CTestTest_CONFIG}" + -S "${CMake_BINARY_DIR}/Tests/CTestTestBadGenerator/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestBadGenerator/testOutput.log" + ) + set_property(TEST CTestTestBadGenerator PROPERTY + PASS_REGULAR_EXPRESSION "could not create generator named \"Bad Generator\"") + + configure_file( "${CMake_SOURCE_DIR}/Tests/CTestTestParallel/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestParallel/test.cmake" @ONLY ESCAPE_QUOTES) diff --git a/Tests/CTestTestBadGenerator/CMakeLists.txt b/Tests/CTestTestBadGenerator/CMakeLists.txt new file mode 100644 index 0000000..d46d9bf --- /dev/null +++ b/Tests/CTestTestBadGenerator/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(CTestTestDepends NONE) +include(CTest) diff --git a/Tests/CTestTestBadGenerator/CTestConfig.cmake b/Tests/CTestTestBadGenerator/CTestConfig.cmake new file mode 100644 index 0000000..ef98189 --- /dev/null +++ b/Tests/CTestTestBadGenerator/CTestConfig.cmake @@ -0,0 +1,7 @@ +set (CTEST_PROJECT_NAME "CTestTestBadGenerator") +set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") +set (CTEST_DART_SERVER_VERSION "2") +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "www.cdash.org") +set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestBadGenerator/test.cmake.in b/Tests/CTestTestBadGenerator/test.cmake.in new file mode 100644 index 0000000..fe4fba8 --- /dev/null +++ b/Tests/CTestTestBadGenerator/test.cmake.in @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.0) + +# Settings: +set(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest") +set(CTEST_SITE "@SITE@") +set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Depends") + +set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestBadGenerator") +set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestBadGenerator") +set(CTEST_CVS_COMMAND "@CVSCOMMAND@") +set(CTEST_CMAKE_GENERATOR "Bad Generator") +set(CTEST_CMAKE_GENERATOR_TOOLSET "") +set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") +set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") + +CTEST_START(Experimental) +CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) +CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) |