Add ability to specify more than one package directory or coverage directory.
This commit is contained in:
parent
220afcaf84
commit
a7abf5e090
|
@ -29,24 +29,32 @@ bool cmParseMumpsCoverage::ReadCoverageFile(const char* file)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string line;
|
std::string line;
|
||||||
cmSystemTools::GetLineFromStream(in, line);
|
while(cmSystemTools::GetLineFromStream(in, line))
|
||||||
|
{
|
||||||
std::string::size_type pos = line.find(':', 0);
|
std::string::size_type pos = line.find(':', 0);
|
||||||
std::string packages;
|
std::string packages;
|
||||||
if(pos != std::string::npos)
|
if(pos != std::string::npos)
|
||||||
{
|
{
|
||||||
packages = line.substr(pos+1);
|
std::string type = line.substr(0, pos);
|
||||||
}
|
std::string path = line.substr(pos+1);
|
||||||
cmSystemTools::GetLineFromStream(in, line);
|
if(type == "packages")
|
||||||
pos = line.find(':', 0);
|
|
||||||
std::string coverage_dir;
|
|
||||||
if(pos != std::string::npos)
|
|
||||||
{
|
{
|
||||||
coverage_dir = line.substr(pos+1);
|
this->LoadPackages(path.c_str());
|
||||||
|
}
|
||||||
|
else if(type == "coverage_dir")
|
||||||
|
{
|
||||||
|
this->LoadCoverageData(path.c_str());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Parse Error in Mumps coverage file :\n"
|
||||||
|
<< file <<
|
||||||
|
"\ntype: [" << type << "]\npath:[" << path << "]\n"
|
||||||
|
"input line: [" << line << "]\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// load the mumps files from the packages directory
|
|
||||||
this->LoadPackages(packages.c_str());
|
|
||||||
// now load the *.mcov files from the coverage directory
|
|
||||||
this->LoadCoverageData(coverage_dir.c_str());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue