mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
cmCTestMultiProcessHandler: Invert spare load condition
Switch then/else blocks to reduce indentation.
This commit is contained in:
@@ -560,14 +560,7 @@ void cmCTestMultiProcessHandler::StartNextTests()
|
||||
size_t processors = this->GetProcessorsUsed(test);
|
||||
if (this->TestLoad > 0) {
|
||||
// Exclude tests that are too big to fit in the spare load.
|
||||
if (processors <= spareLoad) {
|
||||
// We found a test that fits in the spare load.
|
||||
cmCTestLog(this->CTest, DEBUG,
|
||||
"OK to run " << this->GetName(test) << ", it requires "
|
||||
<< processors << " procs & system load is: "
|
||||
<< systemLoad << std::endl);
|
||||
allTestsFailedTestLoadCheck = false;
|
||||
} else {
|
||||
if (processors > spareLoad) {
|
||||
// Keep track of the smallest excluded test to report in message below.
|
||||
if (processors <= minProcessorsRequired) {
|
||||
minProcessorsRequired = processors;
|
||||
@@ -575,6 +568,13 @@ void cmCTestMultiProcessHandler::StartNextTests()
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
// We found a test that fits in the spare load.
|
||||
allTestsFailedTestLoadCheck = false;
|
||||
cmCTestLog(this->CTest, DEBUG,
|
||||
"OK to run "
|
||||
<< this->GetName(test) << ", it requires " << processors
|
||||
<< " procs & system load is: " << systemLoad << std::endl);
|
||||
}
|
||||
|
||||
// Exclude tests that are too big to fit in the concurrency limit.
|
||||
|
||||
Reference in New Issue
Block a user