From adb6bf82b0c780f9fbf36ef5bebaa38d4e7eb5ae Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 18 Dec 2008 12:28:05 -0500 Subject: [PATCH] ENH: Improve 'testing' test to actually test The 'testing' CMake test builds a project that uses add_test. This strengthens the test to actually run CTest on the project build tree after building it. --- Tests/CMakeLists.txt | 5 ++--- Tests/Testing/CMakeLists.txt | 2 +- Tests/Testing/Sub/Sub2/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5596663b5..8ae3041c4 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -537,15 +537,14 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel ENDFOREACH(STP) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial") - ADD_TEST(testing ${CMAKE_CTEST_COMMAND} + ADD_TEST(testing ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} --build-and-test "${CMake_SOURCE_DIR}/Tests/Testing" "${CMake_BINARY_DIR}/Tests/Testing" --build-generator ${CMAKE_TEST_GENERATOR} --build-project Testing --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} - --build-exe-dir "${CMake_BINARY_DIR}/Tests/Testing/bin" - --test-command testing + --test-command ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE} ) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Testing") diff --git a/Tests/Testing/CMakeLists.txt b/Tests/Testing/CMakeLists.txt index c4459bb67..5a15f1105 100644 --- a/Tests/Testing/CMakeLists.txt +++ b/Tests/Testing/CMakeLists.txt @@ -46,7 +46,7 @@ ENABLE_TESTING() # Add test # ADD_EXECUTABLE(testing testing.cxx) -ADD_TEST(testing ${Testing_BINARY_DIR}/bin/testing) +ADD_TEST(testing.1 ${Testing_BINARY_DIR}/bin/testing) # # skip level test diff --git a/Tests/Testing/Sub/Sub2/CMakeLists.txt b/Tests/Testing/Sub/Sub2/CMakeLists.txt index 864c1b7d9..3a7295da6 100644 --- a/Tests/Testing/Sub/Sub2/CMakeLists.txt +++ b/Tests/Testing/Sub/Sub2/CMakeLists.txt @@ -2,4 +2,4 @@ # Add test # ADD_EXECUTABLE(testing2 testing2.cxx) -ADD_TEST(testing2 ${Testing_BINARY_DIR}/bin/testing2) +ADD_TEST(testing.2 ${Testing_BINARY_DIR}/bin/testing2)