diff options
Diffstat (limited to 'Source/CTest/cmCTestMultiProcessHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 67bbb4a..b91f07c 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -256,6 +256,12 @@ bool cmCTestMultiProcessHandler::AllocateResources(int index) return true; } + // If the test needs unavailable resources then do not allocate anything + // because it will never run. We will issue the recorded errors instead. + if (!this->ResourceAvailabilityErrors[index].empty()) { + return true; + } + std::map<std::string, std::vector<cmCTestBinPackerAllocation>> allocations; if (!this->TryAllocateResources(index, allocations)) { return false; @@ -454,10 +460,7 @@ bool cmCTestMultiProcessHandler::StartTest(int test) } } - // Allocate resources - if (this->ResourceAvailabilityErrors[test].empty() && - !this->AllocateResources(test)) { - this->DeallocateResources(test); + if (!this->AllocateResources(test)) { return false; } |