summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2015-07-16 19:48:00 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-28 14:11:09 (GMT)
commitab2524d63f651e6d96c770fb3571bddab4b86621 (patch)
tree33d5acacdcd98f8478ba74bf123764d376ec221b
parentdee84dc73d88d05b9ad66908780c3e7c6ddc67ef (diff)
downloadCMake-ab2524d63f651e6d96c770fb3571bddab4b86621.zip
CMake-ab2524d63f651e6d96c770fb3571bddab4b86621.tar.gz
CMake-ab2524d63f651e6d96c770fb3571bddab4b86621.tar.bz2
CTest: Fix XML double-encoding cases
Remove use of cmXMLSafe from CTest when generating content that is later handled by cmXMLWriter. This was broken by refactoring in the topic merged by commit v3.3.0-rc1~22 (Merge topic 'ctest-xml-refactor', 2015-05-28).
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx16
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/cmCTest.cxx5
3 files changed, 8 insertions, 15 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 8f26716..acf527a 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -80,8 +80,8 @@ public:
int i = 0;
for(; atts[i] != 0; i+=2)
{
- ostr << " " << cmXMLSafe(atts[i])
- << " - " << cmXMLSafe(atts[i+1]) << "\n";
+ ostr << " " << atts[i]
+ << " - " << atts[i+1] << "\n";
}
ostr << "\n";
this->Log += ostr.str();
@@ -856,7 +856,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput(
defects++;
ostr << "<b>" << this->ResultStrings[idx] << "</b> ";
}
- ostr << cmXMLSafe(*i) << std::endl;
+ ostr << *i << std::endl;
}
log = ostr.str();
if(defects)
@@ -908,7 +908,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
results[failure] ++;
defects ++;
}
- ostr << cmXMLSafe(*i) << std::endl;
+ ostr << *i << std::endl;
}
log = ostr.str();
@@ -1056,7 +1056,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
defects ++;
}
totalOutputSize += lines[cc].size();
- ostr << cmXMLSafe(lines[cc]) << std::endl;
+ ostr << lines[cc] << std::endl;
}
else
{
@@ -1070,11 +1070,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i)
{
totalOutputSize += lines[*i].size();
- cmCTestOptionalLog(this->CTest, DEBUG, "before xml safe "
- << lines[*i] << std::endl, this->Quiet);
- cmCTestOptionalLog(this->CTest, DEBUG, "after xml safe "
- << cmXMLSafe(lines[*i]) << std::endl, this->Quiet);
- ostr << cmXMLSafe(lines[*i]) << std::endl;
+ ostr << lines[*i] << std::endl;
if(!unlimitedOutput && totalOutputSize >
static_cast<size_t>(this->CustomMaximumFailedTestOutputSize))
{
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 2af09cb..f93b87b 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -2070,7 +2070,7 @@ bool cmCTestTestHandler::CleanTestOutput(std::string& output, size_t length)
}
current = next;
}
- else // Bad byte will be handled by cmXMLSafe.
+ else // Bad byte will be handled by cmXMLWriter.
{
++current;
}
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index e3b7a2b..8fa19d2 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -22,7 +22,6 @@
#include <cmsys/FStream.hxx>
#include "cmDynamicLoader.h"
#include "cmGeneratedFileStream.h"
-#include "cmXMLSafe.h"
#include "cmVersionMacros.h"
#include "cmCTestCommand.h"
#include "cmCTestStartCommand.h"
@@ -156,7 +155,7 @@ std::string cmCTest::CurrentTime()
strftime(current_time, 1000, "%a %b %d %H:%M:%S %Z %Y", t);
}
cmCTestLog(this, DEBUG, " Current_Time: " << current_time << std::endl);
- return cmXMLSafe(cmCTest::CleanString(current_time)).str();
+ return cmCTest::CleanString(current_time);
}
//----------------------------------------------------------------------
@@ -1477,8 +1476,6 @@ std::string cmCTest::SafeBuildIdField(const std::string& value)
cmSystemTools::ReplaceString(safevalue, replace, "");
}
}
-
- safevalue = cmXMLSafe(safevalue).str();
}
if (safevalue == "")