diff options
author | Brad King <brad.king@kitware.com> | 2023-11-15 20:07:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-21 13:29:17 (GMT) |
commit | 3c4767f4670be61e42c258db281a06067662217c (patch) | |
tree | f4e5d7a7236c11a635d718b62bb5561539f71842 /Source | |
parent | 773fd7e05d55bf079723d3254004a7fe27059f79 (diff) | |
download | CMake-3c4767f4670be61e42c258db281a06067662217c.zip CMake-3c4767f4670be61e42c258db281a06067662217c.tar.gz CMake-3c4767f4670be61e42c258db281a06067662217c.tar.bz2 |
cmCTestTestHandler: Clarify name of member storing RESOURCE_LOCK property
The property represents project-defined resources.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 18 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.h | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.h | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index bfdec9f..a45b3db 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -401,8 +401,8 @@ void cmCTestMultiProcessHandler::SetStopTimePassed() void cmCTestMultiProcessHandler::LockResources(int index) { auto* properties = this->Properties[index]; - this->LockedResources.insert(properties->LockedResources.begin(), - properties->LockedResources.end()); + this->ProjectResourcesLocked.insert(properties->ProjectResources.begin(), + properties->ProjectResources.end()); if (properties->RunSerial) { this->SerialTestRunning = true; } @@ -411,8 +411,8 @@ void cmCTestMultiProcessHandler::LockResources(int index) void cmCTestMultiProcessHandler::UnlockResources(int index) { auto* properties = this->Properties[index]; - for (std::string const& i : properties->LockedResources) { - this->LockedResources.erase(i); + for (std::string const& i : properties->ProjectResources) { + this->ProjectResourcesLocked.erase(i); } if (properties->RunSerial) { this->SerialTestRunning = false; @@ -449,9 +449,9 @@ std::string cmCTestMultiProcessHandler::GetName(int test) bool cmCTestMultiProcessHandler::StartTest(int test) { - // Check for locked resources - for (std::string const& i : this->Properties[test]->LockedResources) { - if (cm::contains(this->LockedResources, i)) { + // Check for locked project resources. + for (std::string const& i : this->Properties[test]->ProjectResources) { + if (cm::contains(this->ProjectResourcesLocked, i)) { return false; } } @@ -1093,9 +1093,9 @@ static Json::Value DumpCTestProperties( properties.append(DumpCTestProperty( "REQUIRED_FILES", DumpToJsonArray(testProperties.RequiredFiles))); } - if (!testProperties.LockedResources.empty()) { + if (!testProperties.ProjectResources.empty()) { properties.append(DumpCTestProperty( - "RESOURCE_LOCK", DumpToJsonArray(testProperties.LockedResources))); + "RESOURCE_LOCK", DumpToJsonArray(testProperties.ProjectResources))); } if (testProperties.RunSerial) { properties.append( diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h index c01089c..6832786 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.h +++ b/Source/CTest/cmCTestMultiProcessHandler.h @@ -194,7 +194,7 @@ protected: std::vector<std::string>* Passed; std::vector<std::string>* Failed; std::vector<std::string> LastTestsFailed; - std::set<std::string> LockedResources; + std::set<std::string> ProjectResourcesLocked; std::map<int, std::vector<std::map<std::string, std::vector<ResourceAllocation>>>> AllocatedResources; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index ba15366..1918b2c 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2233,7 +2233,7 @@ bool cmCTestTestHandler::SetTestsProperties( } else if (key == "RESOURCE_LOCK"_s) { cmList lval{ val }; - rt.LockedResources.insert(lval.begin(), lval.end()); + rt.ProjectResources.insert(lval.begin(), lval.end()); } else if (key == "FIXTURES_SETUP"_s) { cmList lval{ val }; diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h index 23f0a76..b81fcd5 100644 --- a/Source/CTest/cmCTestTestHandler.h +++ b/Source/CTest/cmCTestTestHandler.h @@ -165,7 +165,7 @@ public: std::vector<std::string> Environment; std::vector<std::string> EnvironmentModification; std::vector<std::string> Labels; - std::set<std::string> LockedResources; + std::set<std::string> ProjectResources; // RESOURCE_LOCK std::set<std::string> FixturesSetup; std::set<std::string> FixturesCleanup; std::set<std::string> FixturesRequired; |