From afd185881f3b138389ab79024e397e52cfd945c3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Nov 2023 15:39:52 -0400 Subject: cmCTestMultiProcessHandler: Make loops over all pending tests more consistent Some loops were using the ordered list unnecessarily while others used the main map of pending test. Update all to use the latter. --- Source/CTest/cmCTestMultiProcessHandler.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 4034941..e6466ad 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -358,11 +358,11 @@ bool cmCTestMultiProcessHandler::AllResourcesAvailable() void cmCTestMultiProcessHandler::CheckResourcesAvailable() { if (this->UseResourceSpec) { - for (auto test : this->OrderedTests) { + for (auto const& t : this->PendingTests) { std::map> allocations; - this->TryAllocateResources(test, allocations, - &this->ResourceAllocationErrors[test]); + this->TryAllocateResources(t.first, allocations, + &this->ResourceAllocationErrors[t.first]); } } } @@ -587,8 +587,8 @@ void cmCTestMultiProcessHandler::StartNextTests() // Find out whether there are any non RUN_SERIAL tests left, so that the // correct warning may be displayed. bool onlyRunSerialTestsLeft = true; - for (auto const& test : this->OrderedTests) { - if (!this->Properties[test]->RunSerial) { + for (auto const& t : this->PendingTests) { + if (!this->Properties[t.first]->RunSerial) { onlyRunSerialTestsLeft = false; } } -- cgit v0.12