MCPcopy Create free account
hub / github.com/Kitware/CMake / CreateSerialTestCostList

Method CreateSerialTestCostList

Source/CTest/cmCTestMultiProcessHandler.cxx:1010–1041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010void cmCTestMultiProcessHandler::CreateSerialTestCostList()
1011{
1012 TestList presortedList;
1013
1014 for (auto const& i : this->PendingTests) {
1015 presortedList.push_back(i.first);
1016 }
1017
1018 std::stable_sort(presortedList.begin(), presortedList.end(),
1019 TestComparator(this));
1020
1021 TestSet alreadyOrderedTests;
1022
1023 for (int test : presortedList) {
1024 if (cm::contains(alreadyOrderedTests, test)) {
1025 continue;
1026 }
1027
1028 TestList dependencies;
1029 this->GetAllTestDependencies(test, dependencies);
1030
1031 for (int testDependency : dependencies) {
1032 if (!cm::contains(alreadyOrderedTests, testDependency)) {
1033 alreadyOrderedTests.insert(testDependency);
1034 this->OrderedTests.push_back(testDependency);
1035 }
1036 }
1037
1038 alreadyOrderedTests.insert(test);
1039 this->OrderedTests.push_back(test);
1040 }
1041}
1042
1043void cmCTestMultiProcessHandler::WriteCheckpoint(int index)
1044{

Callers 1

CreateTestCostListMethod · 0.95

Calls 6

TestComparatorClass · 0.85
push_backMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected