diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestCoverageCommand.cxx | 5 | ||||
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 7 | ||||
-rw-r--r-- | Source/CTest/cmCTestMultiProcessHandler.cxx | 13 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitCommand.cxx | 8 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 17 |
5 files changed, 27 insertions, 23 deletions
diff --git a/Source/CTest/cmCTestCoverageCommand.cxx b/Source/CTest/cmCTestCoverageCommand.cxx index d6e6be3..e335923 100644 --- a/Source/CTest/cmCTestCoverageCommand.cxx +++ b/Source/CTest/cmCTestCoverageCommand.cxx @@ -4,9 +4,10 @@ #include <set> +#include <cmext/algorithm> + #include "cm_static_string_view.hxx" -#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmCTestCoverageHandler.h" @@ -22,7 +23,7 @@ void cmCTestCoverageCommand::CheckArguments( std::vector<std::string> const& keywords) { this->LabelsMentioned = - !this->Labels.empty() || cmContains(keywords, "LABELS"); + !this->Labels.empty() || cm::contains(keywords, "LABELS"); } cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler() diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 7ad87f5..8687bb8 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -10,11 +10,12 @@ #include <sstream> #include <utility> +#include <cmext/algorithm> + #include "cmsys/FStream.hxx" #include "cmsys/Glob.hxx" #include "cmsys/RegularExpression.hxx" -#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmDuration.h" #include "cmSystemTools.h" @@ -594,11 +595,11 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() std::string tempDrMemoryDir = this->CTest->GetBinaryDir() + "/Testing/Temporary/DrMemory"; - if (!cmContains(this->MemoryTesterOptions, "-quiet")) { + if (!cm::contains(this->MemoryTesterOptions, "-quiet")) { this->MemoryTesterOptions.emplace_back("-quiet"); } - if (!cmContains(this->MemoryTesterOptions, "-batch")) { + if (!cm::contains(this->MemoryTesterOptions, "-batch")) { this->MemoryTesterOptions.emplace_back("-batch"); } diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 50c963d..3fc417a 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -29,7 +29,6 @@ #include "cm_uv.h" #include "cmAffinity.h" -#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmCTestBinPacker.h" #include "cmCTestRunTest.h" @@ -188,7 +187,7 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test) // Find any failed dependencies for this test. We assume the more common // scenario has no failed tests, so make it the outer loop. for (std::string const& f : *this->Failed) { - if (cmContains(this->Properties[test]->RequireSuccessDepends, f)) { + if (cm::contains(this->Properties[test]->RequireSuccessDepends, f)) { testRun->AddFailedDependency(f); } } @@ -445,7 +444,7 @@ bool cmCTestMultiProcessHandler::StartTest(int test) { // Check for locked resources for (std::string const& i : this->Properties[test]->LockedResources) { - if (cmContains(this->LockedResources, i)) { + if (cm::contains(this->LockedResources, i)) { return false; } } @@ -802,7 +801,7 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() // In parallel test runs add previously failed tests to the front // of the cost list and queue other tests for further sorting for (auto const& t : this->Tests) { - if (cmContains(this->LastTestsFailed, this->Properties[t.first]->Name)) { + if (cm::contains(this->LastTestsFailed, this->Properties[t.first]->Name)) { // If the test failed last time, it should be run first. this->SortedTests.push_back(t.first); alreadySortedTests.insert(t.first); @@ -841,7 +840,7 @@ void cmCTestMultiProcessHandler::CreateParallelTestCostList() TestComparator(this)); for (auto const& j : sortedCopy) { - if (!cmContains(alreadySortedTests, j)) { + if (!cm::contains(alreadySortedTests, j)) { this->SortedTests.push_back(j); alreadySortedTests.insert(j); } @@ -873,7 +872,7 @@ void cmCTestMultiProcessHandler::CreateSerialTestCostList() TestSet alreadySortedTests; for (int test : presortedList) { - if (cmContains(alreadySortedTests, test)) { + if (cm::contains(alreadySortedTests, test)) { continue; } @@ -881,7 +880,7 @@ void cmCTestMultiProcessHandler::CreateSerialTestCostList() GetAllTestDependencies(test, dependencies); for (int testDependency : dependencies) { - if (!cmContains(alreadySortedTests, testDependency)) { + if (!cm::contains(alreadySortedTests, testDependency)) { alreadySortedTests.insert(testDependency); this->SortedTests.push_back(testDependency); } diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index acb75b2..5b2f2e6 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -8,10 +8,10 @@ #include <cm/memory> #include <cm/vector> +#include <cmext/algorithm> #include "cm_static_string_view.hxx" -#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmCTestSubmitHandler.h" #include "cmCommand.h" @@ -172,8 +172,10 @@ void cmCTestSubmitCommand::BindArguments() void cmCTestSubmitCommand::CheckArguments( std::vector<std::string> const& keywords) { - this->PartsMentioned = !this->Parts.empty() || cmContains(keywords, "PARTS"); - this->FilesMentioned = !this->Files.empty() || cmContains(keywords, "FILES"); + this->PartsMentioned = + !this->Parts.empty() || cm::contains(keywords, "PARTS"); + this->FilesMentioned = + !this->Files.empty() || cm::contains(keywords, "FILES"); cm::erase_if(this->Parts, [this](std::string const& arg) -> bool { cmCTest::Part p = this->CTest->GetPartFromName(arg.c_str()); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index ca65946..7f21633 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -19,6 +19,7 @@ #include <cm/memory> #include <cm/string_view> +#include <cmext/algorithm> #include "cmsys/FStream.hxx" #include <cmsys/Base64.h> @@ -28,7 +29,6 @@ #include "cm_static_string_view.hxx" #include "cm_utf8.h" -#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmCTestMultiProcessHandler.h" #include "cmCTestResourceGroupsLexerHelper.h" @@ -711,7 +711,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject) cmCTestTestProperties& p = *result.Properties; for (std::string const& l : p.Labels) { // only use labels found in labels - if (cmContains(labels, l)) { + if (cm::contains(labels, l)) { labelTimes[l] += result.ExecutionTime.count() * result.Properties->Processors; ++labelCounts[l]; @@ -853,14 +853,15 @@ void cmCTestTestHandler::ComputeTestList() if (this->UseUnion) { // if it is not in the list and not in the regexp then skip - if ((!this->TestsToRun.empty() && !cmContains(this->TestsToRun, cnt)) && + if ((!this->TestsToRun.empty() && + !cm::contains(this->TestsToRun, cnt)) && !tp.IsInBasedOnREOptions) { continue; } } else { // is this test in the list of tests to run? If not then skip it if ((!this->TestsToRun.empty() && - !cmContains(this->TestsToRun, inREcnt)) || + !cm::contains(this->TestsToRun, inREcnt)) || !tp.IsInBasedOnREOptions) { continue; } @@ -889,7 +890,7 @@ void cmCTestTestHandler::ComputeTestListForRerunFailed() cnt++; // if this test is not in our list of tests to run, then skip it. - if (!this->TestsToRun.empty() && !cmContains(this->TestsToRun, cnt)) { + if (!this->TestsToRun.empty() && !cm::contains(this->TestsToRun, cnt)) { continue; } @@ -1008,7 +1009,7 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const for (auto sIt = setupRange.first; sIt != setupRange.second; ++sIt) { const std::string& setupTestName = sIt->second->Name; tests[i].RequireSuccessDepends.insert(setupTestName); - if (!cmContains(tests[i].Depends, setupTestName)) { + if (!cm::contains(tests[i].Depends, setupTestName)) { tests[i].Depends.push_back(setupTestName); } } @@ -1112,7 +1113,7 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const const std::vector<size_t>& indices = cIt->second; for (size_t index : indices) { const std::string& reqTestName = tests[index].Name; - if (!cmContains(p.Depends, reqTestName)) { + if (!cm::contains(p.Depends, reqTestName)) { p.Depends.push_back(reqTestName); } } @@ -1125,7 +1126,7 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const const std::vector<size_t>& indices = cIt->second; for (size_t index : indices) { const std::string& setupTestName = tests[index].Name; - if (!cmContains(p.Depends, setupTestName)) { + if (!cm::contains(p.Depends, setupTestName)) { p.Depends.push_back(setupTestName); } } |