cmCTestMemCheckHandler.cxx: minor refactoring

This commit is contained in:
Dietmar Scheidl
2019-12-06 19:26:52 +01:00
committed by Brad King
parent c57bcf3b30
commit 2db0a65f56
+3 -6
View File
@@ -162,12 +162,9 @@ int cmCTestMemCheckHandler::PostProcessHandler()
void cmCTestMemCheckHandler::GenerateTestCommand(
std::vector<std::string>& args, int test)
{
std::string index;
std::ostringstream stream;
std::string index = std::to_string(test);
std::string memcheckcommand =
cmSystemTools::ConvertToOutputPath(this->MemoryTester);
stream << test;
index = stream.str();
for (std::string arg : this->MemoryTesterDynamicOptions) {
std::string::size_type pos = arg.find("??");
if (pos != std::string::npos) {
@@ -387,11 +384,11 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
}
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
"MemCheck log files can be found here: "
"( * corresponds to test number)"
"(<#> corresponds to test number)"
<< std::endl,
this->Quiet);
std::string output = this->MemoryTesterOutputFile;
cmSystemTools::ReplaceString(output, "??", "*");
cmSystemTools::ReplaceString(output, "??", "<#>");
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, output << std::endl,
this->Quiet);
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,