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:
parent
7fc7624af5
commit
8ee6b47630
|
@ -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()
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue