Merge topic 'ctest-xml-minor-cleanup'

b26e5b55 CTest: Generate NamedMeasurement elements directly into xml file
965cf8e6 CTest: Drop stray content from Configure.xml
This commit is contained in:
Brad King 2015-05-28 09:56:51 -04:00 committed by CMake Topic Stage
commit a2312986af
4 changed files with 6 additions and 15 deletions

View File

@ -95,11 +95,6 @@ int cmCTestConfigureHandler::ProcessHandler()
<< std::endl << std::endl
<< "\t<StartConfigureTime>" << start_time_time << "\t<StartConfigureTime>" << start_time_time
<< "</StartConfigureTime>\n"; << "</StartConfigureTime>\n";
if ( res == cmsysProcess_State_Exited && retVal )
{
os << retVal;
}
os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>" os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
<< std::endl; << std::endl;
cmCTestOptionalLog(this->CTest, DEBUG, "End" << std::endl, this->Quiet); cmCTestOptionalLog(this->CTest, DEBUG, "End" << std::endl, this->Quiet);

View File

@ -607,7 +607,7 @@ void cmCTestRunTest::DartProcessing()
{ {
if (this->TestHandler->DartStuff.find(this->ProcessOutput.c_str())) if (this->TestHandler->DartStuff.find(this->ProcessOutput.c_str()))
{ {
std::string dartString = this->TestHandler->DartStuff.match(1); this->TestResult.DartString = this->TestHandler->DartStuff.match(1);
// keep searching and replacing until none are left // keep searching and replacing until none are left
while (this->TestHandler->DartStuff1.find(this->ProcessOutput.c_str())) while (this->TestHandler->DartStuff1.find(this->ProcessOutput.c_str()))
{ {
@ -615,8 +615,6 @@ void cmCTestRunTest::DartProcessing()
cmSystemTools::ReplaceString(this->ProcessOutput, cmSystemTools::ReplaceString(this->ProcessOutput,
this->TestHandler->DartStuff1.match(1).c_str(), ""); this->TestHandler->DartStuff1.match(1).c_str(), "");
} }
this->TestResult.RegressionImages
= this->TestHandler->GenerateRegressionImages(dartString);
} }
} }
} }

View File

@ -1185,7 +1185,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
<< "</Value></NamedMeasurement>" << "</Value></NamedMeasurement>"
<< std::endl; << std::endl;
} }
os << result->RegressionImages; this->GenerateRegressionImages(os, result->DartString);
os << "\t\t\t<NamedMeasurement type=\"numeric/double\" " os << "\t\t\t<NamedMeasurement type=\"numeric/double\" "
<< "name=\"Execution Time\"><Value>" << "name=\"Execution Time\"><Value>"
<< result->ExecutionTime << result->ExecutionTime
@ -1827,8 +1827,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
// Just for convenience // Just for convenience
#define SPACE_REGEX "[ \t\r\n]" #define SPACE_REGEX "[ \t\r\n]"
//---------------------------------------------------------------------- //----------------------------------------------------------------------
std::string cmCTestTestHandler::GenerateRegressionImages( void cmCTestTestHandler::GenerateRegressionImages(
const std::string& xml) std::ostream& ostr, const std::string& xml)
{ {
cmsys::RegularExpression twoattributes( cmsys::RegularExpression twoattributes(
"<DartMeasurement" "<DartMeasurement"
@ -1863,7 +1863,6 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\""
SPACE_REGEX "*>([^<]*)</DartMeasurementFile>"); SPACE_REGEX "*>([^<]*)</DartMeasurementFile>");
std::ostringstream ostr;
bool done = false; bool done = false;
std::string cxml = xml; std::string cxml = xml;
while ( ! done ) while ( ! done )
@ -2025,7 +2024,6 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
done = true; done = true;
} }
} }
return ostr.str();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -128,7 +128,7 @@ public:
bool CompressOutput; bool CompressOutput;
std::string CompletionStatus; std::string CompletionStatus;
std::string Output; std::string Output;
std::string RegressionImages; std::string DartString;
int TestCount; int TestCount;
cmCTestTestProperties* Properties; cmCTestTestProperties* Properties;
}; };
@ -270,7 +270,7 @@ private:
cmsys::RegularExpression IncludeTestsRegularExpression; cmsys::RegularExpression IncludeTestsRegularExpression;
cmsys::RegularExpression ExcludeTestsRegularExpression; cmsys::RegularExpression ExcludeTestsRegularExpression;
std::string GenerateRegressionImages(const std::string& xml); void GenerateRegressionImages(std::ostream& ostr, const std::string& xml);
cmsys::RegularExpression DartStuff1; cmsys::RegularExpression DartStuff1;
void CheckLabelFilter(cmCTestTestProperties& it); void CheckLabelFilter(cmCTestTestProperties& it);
void CheckLabelFilterExclude(cmCTestTestProperties& it); void CheckLabelFilterExclude(cmCTestTestProperties& it);