summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx2
-rw-r--r--Source/CTest/cmCTestConfigureHandler.cxx2
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx6
-rw-r--r--Source/CTest/cmCTestGenericHandler.cxx1
-rw-r--r--Source/CTest/cmCTestGenericHandler.h3
-rw-r--r--Source/CTest/cmCTestHandlerCommand.cxx11
-rw-r--r--Source/CTest/cmCTestHandlerCommand.h2
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx2
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/cmCTest.cxx3
-rw-r--r--Source/cmCTest.h2
11 files changed, 27 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 4c612c0be8..989f9389ad 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -484,7 +484,7 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
std::vector<cmCTestBuildErrorWarning> ew,
double elapsed_build_time)
{
- this->CTest->StartXML(os);
+ this->CTest->StartXML(os, this->AppendXML);
os << "<Build>\n"
<< "\t<StartDateTime>" << this->StartBuild << "</StartDateTime>\n"
<< "\t<StartBuildTime>" <<
diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx
index c744d77f01..42b7c717cc 100644
--- a/Source/CTest/cmCTestConfigureHandler.cxx
+++ b/Source/CTest/cmCTestConfigureHandler.cxx
@@ -92,7 +92,7 @@ int cmCTestConfigureHandler::ProcessHandler()
if ( os )
{
- this->CTest->StartXML(os);
+ this->CTest->StartXML(os, this->AppendXML);
os << "<Configure>\n"
<< "\t<StartDateTime>" << start_time << "</StartDateTime>"
<< std::endl
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 86534d7ece..0b11018521 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -169,7 +169,7 @@ bool cmCTestCoverageHandler::StartCoverageLogFile(
return false;
}
std::string local_start_time = this->CTest->CurrentTime();
- this->CTest->StartXML(covLogFile);
+ this->CTest->StartXML(covLogFile, this->AppendXML);
covLogFile << "<CoverageLog>" << std::endl
<< "\t<StartDateTime>" << local_start_time << "</StartDateTime>"
<< "\t<StartTime>"
@@ -388,7 +388,7 @@ int cmCTestCoverageHandler::ProcessHandler()
return -1;
}
- this->CTest->StartXML(covSumFile);
+ this->CTest->StartXML(covSumFile, this->AppendXML);
// Produce output xml files
covSumFile << "<Coverage>" << std::endl
@@ -1440,7 +1440,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
"Cannot open coverage summary file." << std::endl);
return 0;
}
- this->CTest->StartXML(covSumFile);
+ this->CTest->StartXML(covSumFile, this->AppendXML);
double elapsed_time_start = cmSystemTools::GetTime();
std::string coverage_start_time = this->CTest->CurrentTime();
covSumFile << "<Coverage>" << std::endl
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx
index 6c06f0be25..5060774850 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -26,6 +26,7 @@ cmCTestGenericHandler::cmCTestGenericHandler()
this->HandlerVerbose = false;
this->CTest = 0;
this->SubmitIndex = 0;
+ this->AppendXML = false;
}
//----------------------------------------------------------------------
diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h
index 2b84ded3a4..69bfb7fcae 100644
--- a/Source/CTest/cmCTestGenericHandler.h
+++ b/Source/CTest/cmCTestGenericHandler.h
@@ -88,10 +88,13 @@ public:
void SetSubmitIndex(int idx) { this->SubmitIndex = idx; }
int GetSubmitIndex() { return this->SubmitIndex; }
+ void SetAppendXML(bool b) { this->AppendXML = b; }
+
protected:
bool StartResultingXML(const char* name, cmGeneratedFileStream& xofs);
bool StartLogFile(const char* name, cmGeneratedFileStream& xofs);
+ bool AppendXML;
bool HandlerVerbose;
cmCTest *CTest;
t_StringToString Options;
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index e4ae8327ea..1175879b21 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -33,6 +33,7 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
this->Arguments[ct_BUILD] = "BUILD";
this->Arguments[ct_SUBMIT_INDEX] = "SUBMIT_INDEX";
this->Last = ct_LAST;
+ this->AppendXML = false;
}
bool cmCTestHandlerCommand
@@ -73,6 +74,8 @@ bool cmCTestHandlerCommand
return false;
}
+ handler->SetAppendXML(this->AppendXML);
+
handler->PopulateCustomVectors(this->Makefile);
if ( this->Values[ct_BUILD] )
{
@@ -143,6 +146,14 @@ bool cmCTestHandlerCommand
//----------------------------------------------------------------------------
bool cmCTestHandlerCommand::CheckArgumentKeyword(std::string const& arg)
{
+ // Look for non-value arguments common to all commands.
+ if(arg == "APPEND")
+ {
+ this->ArgumentDoing = ArgumentDoingNone;
+ this->AppendXML = true;
+ return true;
+ }
+
// Check for a keyword in our argument/value table.
for(unsigned int k=0; k < this->Arguments.size(); ++k)
{
diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h
index 8c2e6518e6..dc123ba63e 100644
--- a/Source/CTest/cmCTestHandlerCommand.h
+++ b/Source/CTest/cmCTestHandlerCommand.h
@@ -66,6 +66,8 @@ protected:
int ArgumentDoing;
unsigned int ArgumentIndex;
+ bool AppendXML;
+
std::string ReturnVariable;
std::vector<const char*> Arguments;
std::vector<const char*> Values;
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 71832b5aea..31af3cee2c 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -287,7 +287,7 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
return;
}
- this->CTest->StartXML(os);
+ this->CTest->StartXML(os, this->AppendXML);
os << "<DynamicAnalysis Checker=\"";
switch ( this->MemoryTesterStyle )
{
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 68c5855a72..52b23d55cc 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1442,7 +1442,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
return;
}
- this->CTest->StartXML(os);
+ this->CTest->StartXML(os, this->AppendXML);
os << "<Testing>\n"
<< "\t<StartDateTime>" << this->StartTest << "</StartDateTime>\n"
<< "\t<StartTestTime>" << this->StartTestTime << "</StartTestTime>\n"
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 6a5fc39185..95670339c7 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1269,7 +1269,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
}
//----------------------------------------------------------------------
-void cmCTest::StartXML(std::ostream& ostr)
+void cmCTest::StartXML(std::ostream& ostr, bool append)
{
if(this->CurrentTag.empty())
{
@@ -1289,6 +1289,7 @@ void cmCTest::StartXML(std::ostream& ostr)
<< this->GetTestModelString() << "\"\n\tName=\""
<< this->GetCTestConfiguration("Site") << "\"\n\tGenerator=\"ctest"
<< cmVersion::GetCMakeVersion() << "\"\n"
+ << (append? "\tAppend=\"true\"\n":"")
<< "\tOSName=\"" << info.GetOSName() << "\"\n"
<< "\tHostname=\"" << info.GetHostname() << "\"\n"
<< "\tOSRelease=\"" << info.GetOSRelease() << "\"\n"
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 9916a00593..edce0c4333 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -199,7 +199,7 @@ public:
int* retVal = 0, const char* dir = 0, double timeout = 0.0);
//! Start CTest XML output file
- void StartXML(std::ostream& ostr);
+ void StartXML(std::ostream& ostr, bool append);
//! End CTest XML output file
void EndXML(std::ostream& ostr);