From 419443f68f8d1942cedab04777a5d2e7a0caccd8 Mon Sep 17 00:00:00 2001 From: John Parent Date: Thu, 19 Oct 2023 13:26:16 -0400 Subject: cmCTestMultiProcessHandler: Factor out helper to check for completion --- Source/CTest/cmCTestMultiProcessHandler.cxx | 7 ++++++- Source/CTest/cmCTestMultiProcessHandler.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index b82e968..d71a34d 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -126,6 +126,11 @@ void cmCTestMultiProcessHandler::SetTestLoad(unsigned long load) } } +bool cmCTestMultiProcessHandler::Complete() +{ + return this->Completed == this->Total; +} + void cmCTestMultiProcessHandler::RunTests() { this->CheckResume(); @@ -143,7 +148,7 @@ void cmCTestMultiProcessHandler::RunTests() uv_loop_close(&this->Loop); if (!this->StopTimePassed && !this->CheckStopOnFailure()) { - assert(this->Completed == this->Total); + assert(this->Complete()); assert(this->Tests.empty()); } assert(this->AllResourcesAvailable()); diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index 3b4e9c5..a002bcc 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -152,6 +152,7 @@ protected: InsufficientResources, }; + bool Complete(); bool AllocateResources(int index); bool TryAllocateResources( int index, -- cgit v0.12