summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-13 15:52:05 (GMT)
committerBrad King <brad.king@kitware.com>2012-11-13 15:52:05 (GMT)
commit739f16653d823ea9519405da837cd57dcf204403 (patch)
tree419b605945857c2fbc1a0d140fa44db6e1fc83c5 /Tests
parente31d83b3b8d0fdf767bb294e2643e0099b25d86f (diff)
downloadCMake-739f16653d823ea9519405da837cd57dcf204403.zip
CMake-739f16653d823ea9519405da837cd57dcf204403.tar.gz
CMake-739f16653d823ea9519405da837cd57dcf204403.tar.bz2
Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD
The tests share a single build directory and so should not run in parallel. While at it, add the build dir to the test_clean target.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7f05121..1e8c228 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1417,6 +1417,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
# The test (and tested property) works with .sln files, so it's skipped when:
# * Using VS6, which doesn't use .sln files
# * cmake --build is set up to use MSBuild, since the MSBuild invocation does not use the .sln file
+ set(_last_test "")
foreach(config ${CMAKE_CONFIGURATION_TYPES})
add_test(NAME VSExcludeFromDefaultBuild-${config} COMMAND ${CMAKE_CTEST_COMMAND}
--build-and-test
@@ -1432,7 +1433,13 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
-D "allConfigs=${CMAKE_CONFIGURATION_TYPES}"
-D "dir=${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild"
-P "${CMake_SOURCE_DIR}/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake")
+ if(_last_test)
+ set_property(TEST VSExcludeFromDefaultBuild-${config} PROPERTY DEPENDS ${_last_test})
+ endif()
+ set(_last_test "VSExcludeFromDefaultBuild-${config}")
endforeach()
+ unset(_last_test)
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild")
endif()
endif()