summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-02 18:26:54 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-17 23:43:01 (GMT)
commitb02b628ad9b7c59f703c42fdc238c9f11d277937 (patch)
tree1fd77a61af6aa26e9575cfca4d80616316e5f73d /Source
parent8f1e8af0ccec06b69f25d01d1f27d967a3501f14 (diff)
downloadCMake-b02b628ad9b7c59f703c42fdc238c9f11d277937.zip
CMake-b02b628ad9b7c59f703c42fdc238c9f11d277937.tar.gz
CMake-b02b628ad9b7c59f703c42fdc238c9f11d277937.tar.bz2
cmCTestMultiProcessHandler: Simplify loop termination on serial test
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx7
1 files 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) {