diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2013-10-23 19:47:32 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2013-10-25 19:39:58 (GMT) |
commit | ff59365f8bdcb302f55d4fc882cae057a70acd4b (patch) | |
tree | 10a0320b6a9aebb83dfd897dddf727a776b9b333 | |
parent | 7a665ae7e375db01e3eb89bb65967d03103cf164 (diff) | |
download | CMake-ff59365f8bdcb302f55d4fc882cae057a70acd4b.zip CMake-ff59365f8bdcb302f55d4fc882cae057a70acd4b.tar.gz CMake-ff59365f8bdcb302f55d4fc882cae057a70acd4b.tar.bz2 |
CTest: fix dashboard issues associated with the ctest-fix-run-serial topic
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 27 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/CTestTestSerialInDepends/CMakeLists.txt | 2 |
3 files changed, 24 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 3dd446b..2cae179 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -470,14 +470,18 @@ void cmCTestMultiProcessHandler::CreateTestCostList() priorityStack.push_back(TestSet()); TestSet ¤tSet = priorityStack.back(); - for(TestSet::iterator i = previousSet.begin(); + for(TestSet::const_iterator i = previousSet.begin(); i != previousSet.end(); ++i) { TestSet const& dependencies = this->Tests[*i]; - currentSet.insert(dependencies.begin(), dependencies.end()); + for(TestSet::const_iterator j = dependencies.begin(); + j != dependencies.end(); ++j) + { + currentSet.insert(*j); + } } - for(TestSet::iterator i = currentSet.begin(); + for(TestSet::const_iterator i = currentSet.begin(); i != currentSet.end(); ++i) { previousSet.erase(*i); @@ -492,15 +496,24 @@ void cmCTestMultiProcessHandler::CreateTestCostList() for(std::list<TestSet>::reverse_iterator i = priorityStack.rbegin(); i != priorityStack.rend(); ++i) { - TestSet ¤tSet = *i; + TestSet const& currentSet = *i; TestComparator comp(this); TestList sortedCopy; - sortedCopy.insert(sortedCopy.end(), currentSet.begin(), currentSet.end()); + + for(TestSet::const_iterator j = currentSet.begin(); + j != currentSet.end(); ++j) + { + sortedCopy.push_back(*j); + } + std::stable_sort(sortedCopy.begin(), sortedCopy.end(), comp); - this->SortedTests.insert(this->SortedTests.end(), - sortedCopy.begin(), sortedCopy.end()); + for(TestList::const_iterator j = sortedCopy.begin(); + j != sortedCopy.end(); ++j) + { + this->SortedTests.push_back(*j); + } } } diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 0d35104..d5dec90 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2074,7 +2074,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestParallel/testOutput.log" ) - ADD_TEST_MACRO(CTestTestSerialInDepends ${CMAKE_CTEST_COMMAND} -j 4) + ADD_TEST_MACRO(CTestTestSerialInDepends ${CMAKE_CTEST_COMMAND} -j 4 + --output-on-failure -C "\${CTestTest_CONFIG}") if(NOT BORLAND) set(CTestLimitDashJ_EXTRA_OPTIONS --force-new-ctest-process) diff --git a/Tests/CTestTestSerialInDepends/CMakeLists.txt b/Tests/CTestTestSerialInDepends/CMakeLists.txt index f99acab..90e50f9 100644 --- a/Tests/CTestTestSerialInDepends/CMakeLists.txt +++ b/Tests/CTestTestSerialInDepends/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 2.8.12) +project(CTestTestSerialInDepends) + enable_testing() function(my_add_test NAME COST) |