Merge topic 'fix-showinclude-warnings'
47702b8d
CTest: exclude /showIncludes notes when scraping logs
This commit is contained in:
commit
75428cdfb9
|
@ -587,8 +587,7 @@ void cmCTestLaunch::DumpFileToXML(std::ostream& fxml,
|
||||||
|
|
||||||
while(cmSystemTools::GetLineFromStream(fin, line))
|
while(cmSystemTools::GetLineFromStream(fin, line))
|
||||||
{
|
{
|
||||||
if(OptionFilterPrefix.size() && cmSystemTools::StringStartsWith(
|
if(MatchesFilterPrefix(line))
|
||||||
line.c_str(), OptionFilterPrefix.c_str()))
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -676,6 +675,11 @@ bool cmCTestLaunch::ScrapeLog(std::string const& fname)
|
||||||
std::string line;
|
std::string line;
|
||||||
while(cmSystemTools::GetLineFromStream(fin, line))
|
while(cmSystemTools::GetLineFromStream(fin, line))
|
||||||
{
|
{
|
||||||
|
if(MatchesFilterPrefix(line))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(this->Match(line.c_str(), this->RegexWarning) &&
|
if(this->Match(line.c_str(), this->RegexWarning) &&
|
||||||
!this->Match(line.c_str(), this->RegexWarningSuppress))
|
!this->Match(line.c_str(), this->RegexWarningSuppress))
|
||||||
{
|
{
|
||||||
|
@ -700,6 +704,17 @@ bool cmCTestLaunch::Match(std::string const& line,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool cmCTestLaunch::MatchesFilterPrefix(std::string const& line) const
|
||||||
|
{
|
||||||
|
if(this->OptionFilterPrefix.size() && cmSystemTools::StringStartsWith(
|
||||||
|
line.c_str(), this->OptionFilterPrefix.c_str()))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
int cmCTestLaunch::Main(int argc, const char* const argv[])
|
int cmCTestLaunch::Main(int argc, const char* const argv[])
|
||||||
{
|
{
|
||||||
|
|
|
@ -88,6 +88,7 @@ private:
|
||||||
bool ScrapeLog(std::string const& fname);
|
bool ScrapeLog(std::string const& fname);
|
||||||
bool Match(std::string const& line,
|
bool Match(std::string const& line,
|
||||||
std::vector<cmsys::RegularExpression>& regexps);
|
std::vector<cmsys::RegularExpression>& regexps);
|
||||||
|
bool MatchesFilterPrefix(std::string const& line) const;
|
||||||
|
|
||||||
// Methods to generate the xml fragment.
|
// Methods to generate the xml fragment.
|
||||||
void WriteXML();
|
void WriteXML();
|
||||||
|
|
Loading…
Reference in New Issue