| 21 | } |
| 22 | |
| 23 | bool cmParseCacheCoverage::LoadCoverageData(std::string const& d) |
| 24 | { |
| 25 | // load all the .mcov files in the specified directory |
| 26 | cmsys::Directory dir; |
| 27 | if (!dir.Load(d)) { |
| 28 | return false; |
| 29 | } |
| 30 | size_t numf; |
| 31 | unsigned int i; |
| 32 | numf = dir.GetNumberOfFiles(); |
| 33 | for (i = 0; i < numf; i++) { |
| 34 | std::string file = dir.GetFile(i); |
| 35 | if (file != "." && file != ".." && !cmSystemTools::FileIsDirectory(file)) { |
| 36 | std::string path = cmStrCat(d, '/', file); |
| 37 | if (cmSystemTools::GetFilenameLastExtension(path) == ".cmcov") { |
| 38 | if (!this->ReadCMCovFile(path.c_str())) { |
| 39 | return false; |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | return true; |
| 45 | } |
| 46 | |
| 47 | // not currently used, but leave it in case we want it in the future |
| 48 | void cmParseCacheCoverage::RemoveUnCoveredFiles() |
nothing calls this directly
no test coverage detected