summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx17
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.h1
2 files changed, 7 insertions, 11 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index d910367..be210f4 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -438,13 +438,6 @@ void cmCTestMultiProcessHandler::UnlockResources(int index)
this->RunningCount -= this->GetProcessorsUsed(index);
}
-void cmCTestMultiProcessHandler::ErasePendingTest(int test)
-{
- this->PendingTests.erase(test);
- this->OrderedTests.erase(
- std::find(this->OrderedTests.begin(), this->OrderedTests.end(), test));
-}
-
inline size_t cmCTestMultiProcessHandler::GetProcessorsUsed(int test)
{
size_t processors = static_cast<int>(this->Properties[test]->Processors);
@@ -537,7 +530,8 @@ void cmCTestMultiProcessHandler::StartNextTests()
ti != this->OrderedTests.end()) {
// Increment the test iterator now because the current list
// entry may be deleted below.
- int test = *ti++;
+ auto cti = ti++;
+ int test = *cti;
// We can only start a RUN_SERIAL test if no other tests are also
// running.
@@ -592,7 +586,8 @@ void cmCTestMultiProcessHandler::StartNextTests()
// The test is ready to run.
numToStart -= processors;
- this->ErasePendingTest(test);
+ this->OrderedTests.erase(cti);
+ this->PendingTests.erase(test);
this->StartTest(test);
}
@@ -1411,7 +1406,9 @@ void cmCTestMultiProcessHandler::CheckResume()
void cmCTestMultiProcessHandler::RemoveTest(int index)
{
- this->ErasePendingTest(index);
+ this->OrderedTests.erase(
+ std::find(this->OrderedTests.begin(), this->OrderedTests.end(), index));
+ this->PendingTests.erase(index);
this->Properties.erase(index);
this->Completed++;
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
index ffbe16f..1be04aa 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.h
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
@@ -127,7 +127,6 @@ protected:
// Removes the checkpoint file
void MarkFinished();
- void ErasePendingTest(int index);
void FinishTestProcess(std::unique_ptr<cmCTestRunTest> runner, bool started);
void StartNextTestsOnIdle();