summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBuildHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index c5deb96..2ec1365 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -380,7 +380,7 @@ int cmCTestBuildHandler::ProcessHandler()
// Create lists of regular expression strings for errors, error exceptions,
// warnings and warning exceptions.
- std::vector<cmStdString>::size_type cc;
+ std::vector<std::string>::size_type cc;
for ( cc = 0; cmCTestErrorMatches[cc]; cc ++ )
{
this->CustomErrorMatches.push_back(cmCTestErrorMatches[cc]);
@@ -400,7 +400,7 @@ int cmCTestBuildHandler::ProcessHandler()
}
// Pre-compile regular expressions objects for all regular expressions
- std::vector<cmStdString>::iterator it;
+ std::vector<std::string>::iterator it;
#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \
regexes.clear(); \
@@ -409,7 +409,7 @@ int cmCTestBuildHandler::ProcessHandler()
for ( it = strings.begin(); it != strings.end(); ++it ) \
{ \
cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \
- << it->c_str() << std::endl); \
+ << *it << std::endl); \
regexes.push_back(it->c_str()); \
}
cmCTestBuildHandlerPopulateRegexVector(
@@ -602,9 +602,12 @@ void cmCTestBuildHandler::GenerateXMLLaunched(std::ostream& os)
// Sort XML fragments in chronological order.
cmFileTimeComparison ftc;
FragmentCompare fragmentCompare(&ftc);
- typedef std::set<cmStdString, FragmentCompare> Fragments;
+ 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;
}
@@ -889,7 +894,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
int* retVal, const char* dir, int timeout, std::ostream& ofs)
{
// First generate the command and arguments
- std::vector<cmStdString> args = cmSystemTools::ParseArguments(command);
+ std::vector<std::string> args = cmSystemTools::ParseArguments(command);
if(args.size() < 1)
{
@@ -897,7 +902,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command,
}
std::vector<const char*> argv;
- for(std::vector<cmStdString>::const_iterator a = args.begin();
+ for(std::vector<std::string>::const_iterator a = args.begin();
a != args.end(); ++a)
{
argv.push_back(a->c_str());
@@ -1133,7 +1138,7 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, int length,
errorwarning.PostContext = "";
// Copy pre-context to report
- std::deque<cmStdString>::iterator pcit;
+ std::deque<std::string>::iterator pcit;
for ( pcit = this->PreContext.begin();
pcit != this->PreContext.end();
++pcit )