summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-11-21 01:11:44 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-22 12:49:04 (GMT)
commit0950acb3372d90f21d384600dcd9d9250f87421c (patch)
tree58fc93d3436c956ea25118b8d1013f3c72526ec8 /Source/CTest
parent697900da29f8905dc87047259148ce0dc8b7bdb0 (diff)
downloadCMake-0950acb3372d90f21d384600dcd9d9250f87421c.zip
CMake-0950acb3372d90f21d384600dcd9d9250f87421c.tar.gz
CMake-0950acb3372d90f21d384600dcd9d9250f87421c.tar.bz2
cmCTestMultiProcessHandler: Manage concurrency slots with other resources
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index d9da2d8..3f1e019 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -170,7 +170,6 @@ void cmCTestMultiProcessHandler::StartTestProcess(int test)
"test " << test << "\n", this->Quiet);
// now remove the test itself
this->ErasePendingTest(test);
- this->RunningCount += this->GetProcessorsUsed(test);
auto testRun = cm::make_unique<cmCTestRunTest>(*this, test);
@@ -398,6 +397,8 @@ void cmCTestMultiProcessHandler::SetStopTimePassed()
void cmCTestMultiProcessHandler::LockResources(int index)
{
+ this->RunningCount += this->GetProcessorsUsed(index);
+
auto* properties = this->Properties[index];
this->ProjectResourcesLocked.insert(properties->ProjectResources.begin(),
@@ -437,6 +438,8 @@ void cmCTestMultiProcessHandler::UnlockResources(int index)
if (properties->RunSerial) {
this->SerialTestRunning = false;
}
+
+ this->RunningCount -= this->GetProcessorsUsed(index);
}
void cmCTestMultiProcessHandler::ErasePendingTest(int test)
@@ -691,7 +694,6 @@ void cmCTestMultiProcessHandler::FinishTestProcess(
this->WriteCheckpoint(test);
this->DeallocateResources(test);
this->UnlockResources(test);
- this->RunningCount -= this->GetProcessorsUsed(test);
runner.reset();