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

Method LoadCoverageData

Source/CTest/cmParseGTMCoverage.cxx:21–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool cmParseGTMCoverage::LoadCoverageData(std::string const& d)
22{
23 // load all the .mcov files in the specified directory
24 cmsys::Directory dir;
25 if (!dir.Load(d)) {
26 return false;
27 }
28 size_t numf;
29 unsigned int i;
30 numf = dir.GetNumberOfFiles();
31 for (i = 0; i < numf; i++) {
32 std::string file = dir.GetFile(i);
33 if (file != "." && file != ".." && !cmSystemTools::FileIsDirectory(file)) {
34 std::string path = cmStrCat(d, '/', file);
35 if (cmSystemTools::GetFilenameLastExtension(path) == ".mcov") {
36 if (!this->ReadMCovFile(path.c_str())) {
37 return false;
38 }
39 }
40 }
41 }
42 return true;
43}
44
45bool cmParseGTMCoverage::ReadMCovFile(char const* file)
46{

Callers 4

ReadCoverageFileMethod · 0.45
HandleJacocoCoverageMethod · 0.45
HandleDelphiCoverageMethod · 0.45

Calls 4

ReadMCovFileMethod · 0.95
c_strMethod · 0.80
cmStrCatFunction · 0.50
LoadMethod · 0.45

Tested by 3

HandleJacocoCoverageMethod · 0.36
HandleDelphiCoverageMethod · 0.36