diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2013-10-31 21:10:56 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2013-10-31 21:10:56 (GMT) |
commit | 2eccdbdc2a7d39a1a56e5ed78abb65ad286b7125 (patch) | |
tree | 6a7159f8efd434b844a1284961e55f21d801666e /Source | |
parent | 7a616e75b84d692e2df453e889c12d1afdb6c576 (diff) | |
download | CMake-2eccdbdc2a7d39a1a56e5ed78abb65ad286b7125.zip CMake-2eccdbdc2a7d39a1a56e5ed78abb65ad286b7125.tar.gz CMake-2eccdbdc2a7d39a1a56e5ed78abb65ad286b7125.tar.bz2 |
CTest: prevent tests from being inserted in the cost list twice
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 6e9d0e3..4c39d10 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -441,6 +441,8 @@ int cmCTestMultiProcessHandler::SearchByName(std::string name) //--------------------------------------------------------- void cmCTestMultiProcessHandler::CreateTestCostList() { + TestSet alreadySortedTests; + std::list<TestSet> priorityStack; priorityStack.push_back(TestSet()); TestSet &topLevel = priorityStack.back(); @@ -456,6 +458,7 @@ void cmCTestMultiProcessHandler::CreateTestCostList() { //If the test failed last time, it should be run first. this->SortedTests.push_back(i->first); + alreadySortedTests.insert(i->first); } else { @@ -513,7 +516,11 @@ void cmCTestMultiProcessHandler::CreateTestCostList() for(TestList::const_iterator j = sortedCopy.begin(); j != sortedCopy.end(); ++j) { - this->SortedTests.push_back(*j); + if(alreadySortedTests.find(*j) == alreadySortedTests.end()) + { + this->SortedTests.push_back(*j); + alreadySortedTests.insert(*j); + } } } } |