From 9c0bb7d8070039cfa3f5b944f90308e0283c4ce3 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Sat, 23 May 2015 23:41:09 +0200 Subject: cmCTestConfigureHandler: Port to cmXMLWriter --- Source/CTest/cmCTestConfigureHandler.cxx | 38 ++++++++++++++------------------ 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx index 2c2951d..2e8aeb9 100644 --- a/Source/CTest/cmCTestConfigureHandler.cxx +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -15,7 +15,7 @@ #include "cmCTest.h" #include "cmGeneratedFileStream.h" #include "cmake.h" -#include "cmXMLSafe.h" +#include "cmXMLWriter.h" #include @@ -89,28 +89,22 @@ int cmCTestConfigureHandler::ProcessHandler() if ( os ) { - this->CTest->StartXML(os, this->AppendXML); - os << "\n" - << "\t" << start_time << "" - << std::endl - << "\t" << start_time_time - << "\n"; - os << "" << cCommand << "" - << std::endl; + cmXMLWriter xml(os); + this->CTest->StartXML(xml, this->AppendXML); + xml.StartElement("Configure"); + xml.Element("StartDateTime", start_time); + xml.Element("StartConfigureTime", start_time_time); + xml.Element("ConfigureCommand", cCommand); cmCTestOptionalLog(this->CTest, DEBUG, "End" << std::endl, this->Quiet); - os << "" << cmXMLSafe(output) << "" << std::endl; - std::string end_time = this->CTest->CurrentTime(); - os << "\t" << retVal << "\n" - << "\t" << end_time << "\n" - << "\t" << - static_cast(cmSystemTools::GetTime()) - << "\n" - << "" - << static_cast( - (cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 - << "" - << "" << std::endl; - this->CTest->EndXML(os); + xml.Element("Log", output); + xml.Element("ConfigureStatus", retVal); + xml.Element("EndDateTime", this->CTest->CurrentTime()); + xml.Element("EndConfigureTime", + static_cast(cmSystemTools::GetTime())); + xml.Element("ElapsedMinutes", static_cast( + (cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0); + xml.EndElement(); // Configure + this->CTest->EndXML(xml); } } else -- cgit v0.12