summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMatt McCormick <matt.mccormick@kitware.com>2012-11-01 15:50:58 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-13 18:34:44 (GMT)
commit0a34433dfbd001c5144a2a5889a35a98579f9760 (patch)
treeb5dc3fe91ea0761fede8fc0d3e4d9ee643d4b8e6 /Tests
parent9b66c8faf5a2c0d482c5565056ce844b7b4570ad (diff)
downloadCMake-0a34433dfbd001c5144a2a5889a35a98579f9760.zip
CMake-0a34433dfbd001c5144a2a5889a35a98579f9760.tar.gz
CMake-0a34433dfbd001c5144a2a5889a35a98579f9760.tar.bz2
ExternalProject: Make sure the ExternalProjectUpdate setup is available.
This prepares the numberous tests that occur in the ExternalProjectUpdate test. The tests were passing previously because a fresh build was not performed.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt20
-rw-r--r--Tests/ExternalProjectUpdate/CMakeLists.txt2
2 files changed, 19 insertions, 3 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 311a6d8..c394fc6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -982,7 +982,23 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
set_tests_properties(ExternalProject PROPERTIES
TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
- add_test(ExternalProjectUpdate ${CMAKE_CMAKE_COMMAND}
+ add_test(ExternalProjectUpdateSetup ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate"
+ "${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project ExternalProjectUpdateTest
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate"
+ --force-new-ctest-process
+ --test-command ${CMAKE_CTEST_COMMAND} -V
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate")
+ set_tests_properties(ExternalProjectUpdateSetup PROPERTIES
+ TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
+
+ add_test(NAME ExternalProjectUpdate
+ COMMAND ${CMAKE_CMAKE_COMMAND}
-DExternalProjectUpdate_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate
-DExternalProjectUpdate_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate
-DCMAKE_TEST_GENERATOR=${CMAKE_TEST_GENERATOR}
@@ -994,7 +1010,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
set_tests_properties(ExternalProjectUpdate PROPERTIES
TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}
WORKING_DIRECTORY ${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate
- )
+ DEPENDS ExternalProjectUpdateSetup )
# do each of the tutorial steps
foreach(STP RANGE 1 7)
diff --git a/Tests/ExternalProjectUpdate/CMakeLists.txt b/Tests/ExternalProjectUpdate/CMakeLists.txt
index cb3a94e..c33e90b 100644
--- a/Tests/ExternalProjectUpdate/CMakeLists.txt
+++ b/Tests/ExternalProjectUpdate/CMakeLists.txt
@@ -41,7 +41,7 @@ endif()
# This should be specified from the command line.
if(NOT TEST_GIT_TAG)
- message(FATAL_ERROR "TEST_GIT_TAG must be specified.")
+ set(TEST_GIT_TAG origin/master)
endif()
if(do_git_tests)