summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2017-07-27 16:30:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-07 15:01:49 (GMT)
commit1c61d240ddd5fe493427a10ad571b662ded97eb8 (patch)
treeb260387cf2694e4cc698c2498a578695e721fcc5 /Source/CTest
parentaf9708881f4c2d8f501ae63a4088c020edb6f070 (diff)
downloadCMake-1c61d240ddd5fe493427a10ad571b662ded97eb8.zip
CMake-1c61d240ddd5fe493427a10ad571b662ded97eb8.tar.gz
CMake-1c61d240ddd5fe493427a10ad571b662ded97eb8.tar.bz2
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.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestLaunch.cxx6
1 files changed, 5 insertions, 1 deletions
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";