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.
This commit is contained in:
Brad King 2013-11-14 09:18:51 -05:00
parent 7fc7624af5
commit 8ee6b47630
2 changed files with 16 additions and 10 deletions

10
Tests/BootstrapTest.cmake Normal file
View File

@ -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()

View File

@ -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)