summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-24 14:16:47 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-24 14:16:47 (GMT)
commit21f449214d9bf4c8fa99b3a90029cff2171e3fac (patch)
treec1748d7ccd7de976bac8a4ac7d1c250eb1bdd16d
parentc1b96fddf835d5faf27698d5a1637bd1507274e0 (diff)
parente3770c56a8ef6b20f473556a1ca29ea6e0f51f7f (diff)
downloadCMake-21f449214d9bf4c8fa99b3a90029cff2171e3fac.zip
CMake-21f449214d9bf4c8fa99b3a90029cff2171e3fac.tar.gz
CMake-21f449214d9bf4c8fa99b3a90029cff2171e3fac.tar.bz2
Merge topic 'parallel-boostrap-test'
e3770c56 BootstrapTest: Use --parallel=... argument.
-rw-r--r--Tests/BootstrapTest.cmake9
-rw-r--r--Tests/CMakeLists.txt4
2 files changed, 9 insertions, 4 deletions
diff --git a/Tests/BootstrapTest.cmake b/Tests/BootstrapTest.cmake
index 9c9fe09..07a65bf 100644
--- a/Tests/BootstrapTest.cmake
+++ b/Tests/BootstrapTest.cmake
@@ -1,7 +1,12 @@
file(MAKE_DIRECTORY "${bin_dir}")
-message(STATUS "running bootstrap: ${bootstrap}")
+include(ProcessorCount)
+ProcessorCount(nproc)
+if(NOT nproc EQUAL 0)
+ set(parallel_arg --parallel=${nproc})
+endif()
+message(STATUS "running bootstrap: ${bootstrap} ${parallel_arg}")
execute_process(
- COMMAND ${bootstrap}
+ COMMAND ${bootstrap} ${parallel_arg}
WORKING_DIRECTORY "${bin_dir}"
RESULT_VARIABLE result
)
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7df9403..5d72e5c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -3081,8 +3081,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
-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)
+ # This test will use all processors.
+ set_tests_properties(BootstrapTest PROPERTIES RUN_SERIAL 1)
# provide more time for the bootstrap test
get_test_property(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT)