diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2011-05-26 18:42:41 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2011-05-26 18:50:07 (GMT) |
commit | 9c3a0b9f140f8503bb177c97aadab26fbdded197 (patch) | |
tree | 9c52f3591f9e0eb2e9f2ec98f0230ebeffa8e0e7 /Source/CTest | |
parent | 8024c53389df3ef404725e3d0c5d91a8f7eafbfc (diff) | |
download | CMake-9c3a0b9f140f8503bb177c97aadab26fbdded197.zip CMake-9c3a0b9f140f8503bb177c97aadab26fbdded197.tar.gz CMake-9c3a0b9f140f8503bb177c97aadab26fbdded197.tar.bz2 |
We will actually compress memcheck output if the server supports it.
This change won't be functional until the next release of CDash due to the
version comparison.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 14 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 15 |
2 files changed, 22 insertions, 7 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 13a25cb..0612449 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -344,9 +344,21 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os) } this->MemoryTesterGlobalResults[kk] += memcheckresults[kk]; } + + std::string logTag; + if(this->CTest->ShouldCompressMemCheckOutput()) + { + this->CTest->CompressString(memcheckstr); + logTag = "\t<Log compression=\"gzip\" encoding=\"base64\">\n"; + } + else + { + logTag = "\t<Log>\n"; + } + os << "\t\t</Results>\n" - << "\t<Log>\n" << memcheckstr << std::endl + << logTag << memcheckstr << std::endl << "\t</Log>\n"; this->WriteTestResultFooter(os, result); if ( current < cc ) diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index e9cefae..b5b46f6 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -135,7 +135,10 @@ void cmCTestRunTest::CompressOutput() //--------------------------------------------------------- bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) { - if (!this->TestHandler->MemCheck && this->CTest->ShouldCompressTestOutput()) + if ((!this->TestHandler->MemCheck && + this->CTest->ShouldCompressTestOutput()) || + (this->TestHandler->MemCheck && + this->CTest->ShouldCompressMemCheckOutput())) { this->CompressOutput(); } @@ -279,11 +282,11 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) // Output since that is what is parsed by cmCTestMemCheckHandler if(!this->TestHandler->MemCheck && started) { - this->TestHandler->CleanTestOutput(this->ProcessOutput, - static_cast<size_t> - (this->TestResult.Status == cmCTestTestHandler::COMPLETED ? - this->TestHandler->CustomMaximumPassedTestOutputSize : - this->TestHandler->CustomMaximumFailedTestOutputSize)); + this->TestHandler->CleanTestOutput(this->ProcessOutput, + static_cast<size_t> + (this->TestResult.Status == cmCTestTestHandler::COMPLETED ? + this->TestHandler->CustomMaximumPassedTestOutputSize : + this->TestHandler->CustomMaximumFailedTestOutputSize)); } this->TestResult.Reason = reason; if (this->TestHandler->LogFile) |