diff options
author | Brad King <brad.king@kitware.com> | 2009-02-02 18:24:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-02 18:24:26 (GMT) |
commit | cc2092d5bb282dd4010b11a289638a243f7961e2 (patch) | |
tree | 33ce2e212a858631d55e87a68dd3b99d1cab99db /Source/CTest/cmCTestMemCheckHandler.cxx | |
parent | eea054d82c13430bff4eba800f02a73396b73af2 (diff) | |
download | CMake-cc2092d5bb282dd4010b11a289638a243f7961e2.zip CMake-cc2092d5bb282dd4010b11a289638a243f7961e2.tar.gz CMake-cc2092d5bb282dd4010b11a289638a243f7961e2.tar.bz2 |
ENH: Put test labels in MemCheck results
This refactors generation of <Test> element headers and footers in
cmCTestTestHandler and re-uses it in cmCTestMemCheckHandler. The change
removes duplicate code and enables the new <Labels> element for MemCheck
results.
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 31af3ce..97a6ee0 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -337,30 +337,8 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os) } this->CleanTestOutput(memcheckstr, static_cast<size_t>(this->CustomMaximumFailedTestOutputSize)); - os << "\t<Test Status=\""; - if ( result->Status == cmCTestMemCheckHandler::COMPLETED ) - { - os << "passed"; - } - else if ( result->Status == cmCTestMemCheckHandler::NOT_RUN ) - { - os << "notrun"; - } - else - { - os << "failed"; - } - std::string testPath = result->Path + "/" + result->Name; - os << "\">\n" - << "\t\t<Name>" << cmCTest::MakeXMLSafe(result->Name) << "</Name>\n" - << "\t\t<Path>" << cmCTest::MakeXMLSafe( - this->CTest->GetShortPathToFile(result->Path.c_str())) << "</Path>\n" - << "\t\t<FullName>" << cmCTest::MakeXMLSafe( - this->CTest->GetShortPathToFile(testPath.c_str())) << "</FullName>\n" - << "\t\t<FullCommandLine>" - << cmCTest::MakeXMLSafe(result->FullCommandLine) - << "</FullCommandLine>\n" - << "\t\t<Results>" << std::endl; + this->WriteTestResultHeader(os, result); + os << "\t\t<Results>" << std::endl; for ( kk = 0; cmCTestMemCheckResultLongStrings[kk]; kk ++ ) { if ( memcheckresults[kk] ) @@ -375,8 +353,8 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os) os << "\t\t</Results>\n" << "\t<Log>\n" << memcheckstr << std::endl - << "\t</Log>\n" - << "\t</Test>" << std::endl; + << "\t</Log>\n"; + this->WriteTestResultFooter(os, result); if ( current < cc ) { cmCTestLog(this->CTest, HANDLER_OUTPUT, "#" << std::flush); |