summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-01-22 12:16:05 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-01-22 12:16:05 (GMT)
commit0a23c0ee40939b50a41a2d80e98f6f307d84d26f (patch)
tree2185a6e36f0b7b17ed0aef38b6f7bb72c17d95dd
parent5f3c354b66601789c606e526e3039025aaabc127 (diff)
downloadCMake-0a23c0ee40939b50a41a2d80e98f6f307d84d26f.zip
CMake-0a23c0ee40939b50a41a2d80e98f6f307d84d26f.tar.gz
CMake-0a23c0ee40939b50a41a2d80e98f6f307d84d26f.tar.bz2
BUG: Fix issue #8363. Wrap output with MakeXMLSafe calls so that the generated XML files are valid, parse-able XML.
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index dfe46ef..c04fd9a 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1503,26 +1503,31 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
{
os << "\t\t\t<NamedMeasurement type=\"text/string\" "
"name=\"Exit Code\"><Value>"
- << this->GetTestStatus(result->Status) << "</Value>"
+ << cmCTest::MakeXMLSafe(this->GetTestStatus(result->Status))
+ << "</Value>"
"</NamedMeasurement>\n"
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
"name=\"Exit Value\"><Value>"
- << result->ReturnValue << "</Value></NamedMeasurement>"
+ << result->ReturnValue
+ << "</Value></NamedMeasurement>"
<< std::endl;
}
os << result->RegressionImages;
os << "\t\t\t<NamedMeasurement type=\"numeric/double\" "
<< "name=\"Execution Time\"><Value>"
- << result->ExecutionTime << "</Value></NamedMeasurement>\n";
+ << result->ExecutionTime
+ << "</Value></NamedMeasurement>\n";
os
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
<< "name=\"Completion Status\"><Value>"
- << result->CompletionStatus << "</Value></NamedMeasurement>\n";
+ << cmCTest::MakeXMLSafe(result->CompletionStatus)
+ << "</Value></NamedMeasurement>\n";
}
os
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
<< "name=\"Command Line\"><Value>"
- << result->FullCommandLine << "</Value></NamedMeasurement>\n";
+ << cmCTest::MakeXMLSafe(result->FullCommandLine)
+ << "</Value></NamedMeasurement>\n";
std::map<cmStdString,cmStdString>::iterator measureIt;
for ( measureIt = result->Properties->Measurements.begin();
measureIt != result->Properties->Measurements.end();
@@ -1531,7 +1536,8 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
os
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
<< "name=\"" << measureIt->first.c_str() << "\"><Value>"
- << measureIt->second.c_str() << "</Value></NamedMeasurement>\n";
+ << cmCTest::MakeXMLSafe(measureIt->second.c_str())
+ << "</Value></NamedMeasurement>\n";
}
os
<< "\t\t\t<Measurement>\n"