mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
CTest: Save sanitizer output files after test execution
Prior to this change after tests were executed output files produced by sanitizers were removed. User couldn't check in detail why test case didn't pass. Output files are kept without pid in the end.
This commit is contained in:
@@ -1364,9 +1364,15 @@ void cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
|
||||
}
|
||||
}
|
||||
if (this->LogWithPID) {
|
||||
cmSystemTools::RemoveFile(ofile);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Remove: " << ofile << "\n", this->Quiet);
|
||||
auto pos = ofile.find_last_of('.');
|
||||
if (pos != std::string::npos) {
|
||||
auto ofileWithoutPid = ofile.substr(0, pos);
|
||||
cmSystemTools::RenameFile(ofile, ofileWithoutPid);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Renaming: " << ofile << " to: " << ofileWithoutPid
|
||||
<< "\n",
|
||||
this->Quiet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user