summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-10-20 19:34:48 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-21 13:29:17 (GMT)
commitad3df3ce4dfe772c0a95eefd88628b4a800803d9 (patch)
tree6172c760adc732d68a4201637938adfc146ab00c /Source/CTest
parent3c4767f4670be61e42c258db281a06067662217c (diff)
downloadCMake-ad3df3ce4dfe772c0a95eefd88628b4a800803d9.zip
CMake-ad3df3ce4dfe772c0a95eefd88628b4a800803d9.tar.gz
CMake-ad3df3ce4dfe772c0a95eefd88628b4a800803d9.tar.bz2
cmCTestMultiProcessHandler: Exclude dependent tests earlier
Tests with unfinished dependencies should not be considered at all when looking for tests that fit within the load and concurrency limits.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index a45b3db..3759af1 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -460,14 +460,7 @@ bool cmCTestMultiProcessHandler::StartTest(int test)
return false;
}
- // if there are no depends left then run this test
- if (this->PendingTests[test].Depends.empty()) {
- return this->StartTestProcess(test);
- }
- // This test was not able to start because it is waiting
- // on depends to run
- this->DeallocateResources(test);
- return false;
+ return this->StartTestProcess(test);
}
void cmCTestMultiProcessHandler::StartNextTests()
@@ -553,6 +546,11 @@ void cmCTestMultiProcessHandler::StartNextTests()
continue;
}
+ // Exclude tests that depend on unfinished tests.
+ if (!this->PendingTests[test].Depends.empty()) {
+ continue;
+ }
+
size_t processors = this->GetProcessorsUsed(test);
if (this->TestLoad > 0) {
// Exclude tests that are too big to fit in the spare load.