diff options
author | Brad King <brad.king@kitware.com> | 2014-06-25 14:53:09 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-06-25 14:53:09 (GMT) |
commit | 4c27c51f25aa8b01036a29f88099b6aa304daa13 (patch) | |
tree | f7f8cf1119e2b23fafc804b982a3aa2eb3edb73b /Source | |
parent | 1b40fc835e654f1a10f1d3248d24960a24ffcf95 (diff) | |
parent | f730313143e6d8314ee11692ee04358ed86354d0 (diff) | |
download | CMake-4c27c51f25aa8b01036a29f88099b6aa304daa13.zip CMake-4c27c51f25aa8b01036a29f88099b6aa304daa13.tar.gz CMake-4c27c51f25aa8b01036a29f88099b6aa304daa13.tar.bz2 |
Merge topic 'launcher-limit-warnings-errors'
f7303131 CTest: Teach the launchers to honer the max warnings and errors
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; } |