Merge topic 'fix_truncation_logic_valgrind_output'
b35a7730
Fix truncation of valgrind output logic.
This commit is contained in:
commit
6548e171e3
|
@ -932,7 +932,6 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
||||||
double sttime = cmSystemTools::GetTime();
|
double sttime = cmSystemTools::GetTime();
|
||||||
cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl);
|
cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl);
|
||||||
std::string::size_type totalOutputSize = 0;
|
std::string::size_type totalOutputSize = 0;
|
||||||
bool outputFull = false;
|
|
||||||
for ( cc = 0; cc < lines.size(); cc ++ )
|
for ( cc = 0; cc < lines.size(); cc ++ )
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, DEBUG, "test line "
|
cmCTestLog(this->CTest, DEBUG, "test line "
|
||||||
|
@ -1019,8 +1018,8 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Now put all all the non valgrind output into the test output
|
// Now put all all the non valgrind output into the test output
|
||||||
if(!outputFull)
|
// This should be last in case it gets truncated by the output
|
||||||
{
|
// limiting code
|
||||||
for(std::vector<std::string::size_type>::iterator i =
|
for(std::vector<std::string::size_type>::iterator i =
|
||||||
nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i)
|
nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1029,18 +1028,16 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
||||||
<< lines[*i] << std::endl);
|
<< lines[*i] << std::endl);
|
||||||
cmCTestLog(this->CTest, DEBUG, "after xml safe "
|
cmCTestLog(this->CTest, DEBUG, "after xml safe "
|
||||||
<< cmXMLSafe(lines[*i]) << std::endl);
|
<< cmXMLSafe(lines[*i]) << std::endl);
|
||||||
|
|
||||||
ostr << cmXMLSafe(lines[*i]) << std::endl;
|
ostr << cmXMLSafe(lines[*i]) << std::endl;
|
||||||
if(!unlimitedOutput && totalOutputSize >
|
if(!unlimitedOutput && totalOutputSize >
|
||||||
static_cast<size_t>(this->CustomMaximumFailedTestOutputSize))
|
static_cast<size_t>(this->CustomMaximumFailedTestOutputSize))
|
||||||
{
|
{
|
||||||
outputFull = true;
|
|
||||||
ostr << "....\n";
|
ostr << "....\n";
|
||||||
ostr << "Test Output for this test has been truncated see testing"
|
ostr << "Test Output for this test has been truncated see testing"
|
||||||
" machine logs for full output,\n";
|
" machine logs for full output,\n";
|
||||||
ostr << "or put CTEST_FULL_OUTPUT in the output of "
|
ostr << "or put CTEST_FULL_OUTPUT in the output of "
|
||||||
"this test program.\n";
|
"this test program.\n";
|
||||||
}
|
break; // stop the copy of output if we are full
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, DEBUG, "End test (elapsed: "
|
cmCTestLog(this->CTest, DEBUG, "End test (elapsed: "
|
||||||
|
|
Loading…
Reference in New Issue