mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -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);
|
size_t processors = this->GetProcessorsUsed(test);
|
||||||
if (this->TestLoad > 0) {
|
if (this->TestLoad > 0) {
|
||||||
// Exclude tests that are too big to fit in the spare load.
|
// Exclude tests that are too big to fit in the spare load.
|
||||||
if (processors <= spareLoad) {
|
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 {
|
|
||||||
// Keep track of the smallest excluded test to report in message below.
|
// Keep track of the smallest excluded test to report in message below.
|
||||||
if (processors <= minProcessorsRequired) {
|
if (processors <= minProcessorsRequired) {
|
||||||
minProcessorsRequired = processors;
|
minProcessorsRequired = processors;
|
||||||
@@ -575,6 +568,13 @@ void cmCTestMultiProcessHandler::StartNextTests()
|
|||||||
}
|
}
|
||||||
continue;
|
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.
|
// Exclude tests that are too big to fit in the concurrency limit.
|
||||||
|
|||||||
Reference in New Issue
Block a user