summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-14 14:18:51 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-18 13:26:22 (GMT)
commit8ee6b4763034439ce5aada285de5fa584144c6c6 (patch)
tree51d95672e9ea2f33e0522bcfd3b7906bd23c916b /Tests
parent7fc7624af5403e6bff9dbc99da398be314c0b223 (diff)
downloadCMake-8ee6b4763034439ce5aada285de5fa584144c6c6.zip
CMake-8ee6b4763034439ce5aada285de5fa584144c6c6.tar.gz
CMake-8ee6b4763034439ce5aada285de5fa584144c6c6.tar.bz2
Tests: Launch BootstrapTest through cmake instead of ctest
Run the bootstrap script through "cmake -P" instead of "ctest --build-and-test" so that we do not need to abuse the --build-makeprogram option of the latter.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BootstrapTest.cmake10
-rw-r--r--Tests/CMakeLists.txt16
2 files changed, 16 insertions, 10 deletions
diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake
new file mode 100644
index 0000000..9c9fe09
--- /dev/null
+++ b/Tests/BootstrapTest.cmake
@@ -0,0 +1,10 @@
+file(MAKE_DIRECTORY "${bin_dir}")
+message(STATUS "running bootstrap: ${bootstrap}")
+execute_process(
+ COMMAND ${bootstrap}
+ WORKING_DIRECTORY "${bin_dir}"
+ RESULT_VARIABLE result
+ )
+if(result)
+ message(FATAL_ERROR "bootstrap failed: ${result}")
+endif()
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 1b8b2ec..73f880f 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2417,16 +2417,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
endif()
endif()
if(bootstrap)
- add_test(BootstrapTest ${CMAKE_CTEST_COMMAND}
- --build-and-test
- ${CMake_SOURCE_DIR}
- ${CMake_BINARY_DIR}/Tests/BootstrapTest
- --build-nocmake
- --build-noclean
- --build-makeprogram ${bootstrap}
- --build-generator "${CMAKE_TEST_GENERATOR}"
- --test-command
- ${CMake_BINARY_DIR}/Tests/BootstrapTest/Bootstrap.cmk/cmake)
+ add_test(NAME BootstrapTest
+ COMMAND ${CMAKE_CMAKE_COMMAND}
+ -D "bootstrap=${bootstrap}"
+ -D "bin_dir=${CMake_BINARY_DIR}/Tests/BootstrapTest"
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/BootstrapTest.cmake
+ )
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest")
# Make this test run early during parallel execution
set_tests_properties(BootstrapTest PROPERTIES COST 5000)