From 1c61d240ddd5fe493427a10ad571b662ded97eb8 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 27 Jul 2017 12:30:34 -0400 Subject: 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. --- Source/CTest/cmCTestLaunch.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 5b21351..9be8696 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -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"; -- cgit v0.12