From b02b628ad9b7c59f703c42fdc238c9f11d277937 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 2 Nov 2023 14:26:54 -0400 Subject: cmCTestMultiProcessHandler: Simplify loop termination on serial test --- Source/CTest/cmCTestMultiProcessHandler.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 31b7422..61582d1 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -542,15 +542,12 @@ void cmCTestMultiProcessHandler::StartNextTests() // Start tests in the preferred order, each subject to readiness checks. auto ti = this->OrderedTests.begin(); - while (numToStart > 0 && ti != this->OrderedTests.end()) { + while (numToStart > 0 && !this->SerialTestRunning && + ti != this->OrderedTests.end()) { // Increment the test iterator now because the current list // entry may be deleted below. int test = *ti++; - // Take a nap if we're currently performing a RUN_SERIAL test. - if (this->SerialTestRunning) { - break; - } // We can only start a RUN_SERIAL test if no other tests are also // running. if (this->Properties[test]->RunSerial && this->RunningCount > 0) { -- cgit v0.12