summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-10-20 19:20:41 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-17 23:41:42 (GMT)
commitbd0b4ca867c297a42b3128e0193c6ab01f1b53ec (patch)
treee83c4c4b62b44deff42c4abcc45364ad932f4a82 /Source/CTest
parent9b548139fd63c22325330b58a00c4d610a500447 (diff)
downloadCMake-bd0b4ca867c297a42b3128e0193c6ab01f1b53ec.zip
CMake-bd0b4ca867c297a42b3128e0193c6ab01f1b53ec.tar.gz
CMake-bd0b4ca867c297a42b3128e0193c6ab01f1b53ec.tar.bz2
cmCTestMultiProcessHandler: Invert spare load condition
Switch then/else blocks to reduce indentation.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 0691008..d4cda42 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -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.