diff options
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestMemCheckHandler.cxx | 14 | ||||
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 18 |
2 files changed, 24 insertions, 8 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 42a4cff..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->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) @@ -332,7 +335,8 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started) // record the results in TestResult if(started) { - bool compress = this->CompressionRatio < 1 && + bool compress = !this->TestHandler->MemCheck && + this->CompressionRatio < 1 && this->CTest->ShouldCompressTestOutput(); this->TestResult.Output = compress ? this->CompressedOutput : this->ProcessOutput; |