|
|
@@ -37,13 +37,6 @@
|
|
|
#include <float.h>
|
|
|
|
|
|
|
|
|
-//----------------------------------------------------------------------
|
|
|
-cmCTestBuildHandler::cmCTestBuildHandler()
|
|
|
-{
|
|
|
- m_Verbose = false;
|
|
|
- m_CTest = 0;
|
|
|
-}
|
|
|
-
|
|
|
static const char* cmCTestErrorMatches[] = {
|
|
|
"^[Bb]us [Ee]rror",
|
|
|
"^[Ss]egmentation [Vv]iolation",
|
|
|
@@ -138,6 +131,34 @@ static const char* cmCTestWarningExceptions[] = {
|
|
|
0
|
|
|
};
|
|
|
|
|
|
+static cmCTestBuildHandler::cmCTestCompileErrorWarningRex
|
|
|
+cmCTestWarningErrorFileLine[] = {
|
|
|
+ { "^Warning W[0-9]+ ([a-zA-Z.\\:/0-9_+ ~-]+) ([0-9]+):", 1, 2, 0 },
|
|
|
+ { "^([a-zA-Z./0-9_+ ~-]+):([0-9]+):", 1, 2, 0 },
|
|
|
+ { "^([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2, 0 },
|
|
|
+ { "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2, 0 },
|
|
|
+ { "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2, 0 },
|
|
|
+ { "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2, 0 },
|
|
|
+ { 0, 0, 0, 0 }
|
|
|
+};
|
|
|
+
|
|
|
+//----------------------------------------------------------------------
|
|
|
+cmCTestBuildHandler::cmCTestBuildHandler()
|
|
|
+{
|
|
|
+ m_Verbose = false;
|
|
|
+ m_CTest = 0;
|
|
|
+ int cc;
|
|
|
+ for ( cc = 0; cmCTestWarningErrorFileLine[cc].m_RegularExpressionString; ++ cc )
|
|
|
+ {
|
|
|
+ if ( !cmCTestWarningErrorFileLine[cc].m_RegularExpression.compile(
|
|
|
+ cmCTestWarningErrorFileLine[cc].m_RegularExpressionString) )
|
|
|
+ {
|
|
|
+ std::cout << "Problem Compiling regular expression: "
|
|
|
+ << cmCTestWarningErrorFileLine[cc].m_RegularExpressionString << std::endl;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile *mf)
|
|
|
@@ -421,6 +442,17 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
|
|
|
<< "\t\t<BuildLogLine>" << cm->m_LogLine << "</BuildLogLine>\n"
|
|
|
<< "\t\t<Text>" << m_CTest->MakeXMLSafe(cm->m_Text)
|
|
|
<< "\n</Text>" << std::endl;
|
|
|
+ int cc;
|
|
|
+ for ( cc = 0; cmCTestWarningErrorFileLine[cc].m_RegularExpressionString; ++ cc )
|
|
|
+ {
|
|
|
+ cmsys::RegularExpression* re = &cmCTestWarningErrorFileLine[cc].m_RegularExpression;
|
|
|
+ if ( re->find(cm->m_Text.c_str() ) )
|
|
|
+ {
|
|
|
+ cm->m_SourceFile = re->match(cmCTestWarningErrorFileLine[cc].m_FileIndex);
|
|
|
+ cm->m_LineNumber = atoi(re->match(cmCTestWarningErrorFileLine[cc].m_LineIndex).c_str());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
if ( cm->m_SourceFile.size() > 0 )
|
|
|
{
|
|
|
os << "\t\t<SourceFile>" << cm->m_SourceFile << "</SourceFile>"
|