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

Method ReadCoverageFile

Source/CTest/cmParseMumpsCoverage.cxx:25–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23cmParseMumpsCoverage::~cmParseMumpsCoverage() = default;
24
25bool cmParseMumpsCoverage::ReadCoverageFile(char const* file)
26{
27 // Read the gtm_coverage.mcov file, that has two lines of data:
28 // packages:/full/path/to/Vista/Packages
29 // coverage_dir:/full/path/to/dir/with/*.mcov
30 cmsys::ifstream in(file);
31 if (!in) {
32 return false;
33 }
34 std::string line;
35 while (cmSystemTools::GetLineFromStream(in, line)) {
36 std::string::size_type pos = line.find(':', 0);
37 std::string packages;
38 if (pos != std::string::npos) {
39 std::string type = line.substr(0, pos);
40 std::string path = line.substr(pos + 1);
41 if (type == "packages") {
42 this->LoadPackages(path);
43 } else if (type == "coverage_dir") {
44 this->LoadCoverageData(path);
45 } else {
46 cmCTestLog(this->CTest, ERROR_MESSAGE,
47 "Parse Error in Mumps coverage file :\n"
48 << file << "\ntype: [" << type << "]\npath:[" << path
49 << "]\n"
50 "input line: ["
51 << line << "]\n");
52 }
53 }
54 }
55 return true;
56}
57
58void cmParseMumpsCoverage::InitializeMumpsFile(std::string& file)
59{

Callers 1

HandleMumpsCoverageMethod · 0.80

Calls 4

LoadPackagesMethod · 0.95
findMethod · 0.45
substrMethod · 0.45
LoadCoverageDataMethod · 0.45

Tested by 1

HandleMumpsCoverageMethod · 0.64