diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2014-06-24 17:35:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-25 14:53:34 (GMT) |
commit | f730313143e6d8314ee11692ee04358ed86354d0 (patch) | |
tree | 0e2453813674fd1e33d790e927bf4ef2f3745e84 /Source | |
parent | c196b3ca023aeddfa8851477fc34a068bdd7d26f (diff) | |
download | CMake-f730313143e6d8314ee11692ee04358ed86354d0.zip CMake-f730313143e6d8314ee11692ee04358ed86354d0.tar.gz CMake-f730313143e6d8314ee11692ee04358ed86354d0.tar.bz2 |
CTest: Teach the launchers to honer the max warnings and errors
The ctest launcher code did not respect the number of errors and
warnings limits. Limit the number of launcher report fragments that we
report in the final submission.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 7922c9a..2ec1365 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -605,6 +605,9 @@ void cmCTestBuildHandler::GenerateXMLLaunched(std::ostream& os) typedef std::set<std::string, FragmentCompare> Fragments; Fragments fragments(fragmentCompare); + // only report the first 50 warnings and first 50 errors + int numErrorsAllowed = this->MaxErrors; + int numWarningsAllowed = this->MaxWarnings; // Identify fragments on disk. cmsys::Directory launchDir; launchDir.Load(this->CTestLaunchDir.c_str()); @@ -612,13 +615,15 @@ void cmCTestBuildHandler::GenerateXMLLaunched(std::ostream& os) for(unsigned long i=0; i < n; ++i) { const char* fname = launchDir.GetFile(i); - if(this->IsLaunchedErrorFile(fname)) + if(this->IsLaunchedErrorFile(fname) && numErrorsAllowed) { + numErrorsAllowed--; fragments.insert(this->CTestLaunchDir + "/" + fname); ++this->TotalErrors; } - else if(this->IsLaunchedWarningFile(fname)) + else if(this->IsLaunchedWarningFile(fname) && numWarningsAllowed) { + numWarningsAllowed--; fragments.insert(this->CTestLaunchDir + "/" + fname); ++this->TotalWarnings; } |