CTest: Report lines matched by launchers

Since launchers show the entire stderr/stdout for a command and only
skip it if all of the lines are suppressed, it can be hard to tell if
individual suppressions are working.  Mark up the output reported to
CDash with a prefix for each line indicating whether it was a matched or
suppressed warning.  Lines that are suppressed are prefixed with
`[CTest: warning suppressed]` and lines that match the warning
expression are prefixed with `[CTest: warning matched]`. This should
make it easier for people to add suppressions as they will know what
they need to match and what they have already suppressed. This is an
issue because if there is more than one warning in a single compiler
output you have to suppress all of them before it will go away.
This commit is contained in:
Bill Hoffman 2017-07-27 12:30:34 -04:00 committed by Brad King
parent af9708881f
commit 1c61d240dd

View File

@ -508,7 +508,11 @@ void cmCTestLaunch::DumpFileToXML(cmXMLWriter& xml, std::string const& fname)
if (MatchesFilterPrefix(line)) {
continue;
}
if (this->Match(line, this->RegexWarningSuppress)) {
line = "[CTest: warning suppressed] " + line;
} else if (this->Match(line, this->RegexWarning)) {
line = "[CTest: warning matched] " + line;
}
xml.Content(sep);
xml.Content(line);
sep = "\n";