|
@@ -1127,7 +1127,13 @@ cmCTestMemCheckHandler::PostProcessTest(cmCTestTestResult& res,
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- this->AppendMemTesterOutput(res, test);
|
|
|
|
|
|
|
+ std::vector<std::string> files;
|
|
|
|
|
+ this->TestOutputFileNames(test, files);
|
|
|
|
|
+ for(std::vector<std::string>::iterator i = files.begin();
|
|
|
|
|
+ i != files.end(); ++i)
|
|
|
|
|
+ {
|
|
|
|
|
+ this->AppendMemTesterOutput(res, *i);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1141,11 +1147,13 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
|
|
"PostProcessBoundsCheckerTest for : "
|
|
"PostProcessBoundsCheckerTest for : "
|
|
|
<< res.Name << std::endl);
|
|
<< res.Name << std::endl);
|
|
|
- std::string ofile = this->TestOutputFileName(test);
|
|
|
|
|
- if ( ofile.empty() )
|
|
|
|
|
|
|
+ std::vector<std::string> files;
|
|
|
|
|
+ this->TestOutputFileNames(test, files);
|
|
|
|
|
+ if ( files.size() == 0 )
|
|
|
{
|
|
{
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ std::string ofile = files[0];
|
|
|
// put a scope around this to close ifs so the file can be removed
|
|
// put a scope around this to close ifs so the file can be removed
|
|
|
{
|
|
{
|
|
|
cmsys::ifstream ifs(ofile.c_str());
|
|
cmsys::ifstream ifs(ofile.c_str());
|
|
@@ -1175,9 +1183,8 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
|
|
|
|
|
|
|
|
void
|
|
void
|
|
|
cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
|
|
cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
|
|
|
- int test)
|
|
|
|
|
|
|
+ std::string const& ofile)
|
|
|
{
|
|
{
|
|
|
- std::string ofile = this->TestOutputFileName(test);
|
|
|
|
|
if ( ofile.empty() )
|
|
if ( ofile.empty() )
|
|
|
{
|
|
{
|
|
|
return;
|
|
return;
|
|
@@ -1205,8 +1212,9 @@ cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-std::string
|
|
|
|
|
-cmCTestMemCheckHandler::TestOutputFileName(int test)
|
|
|
|
|
|
|
+void cmCTestMemCheckHandler::TestOutputFileNames(int test,
|
|
|
|
|
+ std::vector<std::string>&
|
|
|
|
|
+ files)
|
|
|
{
|
|
{
|
|
|
std::string index;
|
|
std::string index;
|
|
|
cmOStringStream stream;
|
|
cmOStringStream stream;
|
|
@@ -1229,7 +1237,8 @@ cmCTestMemCheckHandler::TestOutputFileName(int test)
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- ofile = g.GetFiles()[0];
|
|
|
|
|
|
|
+ files = g.GetFiles();
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else if ( !cmSystemTools::FileExists(ofile.c_str()) )
|
|
else if ( !cmSystemTools::FileExists(ofile.c_str()) )
|
|
@@ -1239,5 +1248,5 @@ cmCTestMemCheckHandler::TestOutputFileName(int test)
|
|
|
cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl);
|
|
cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl);
|
|
|
ofile = "";
|
|
ofile = "";
|
|
|
}
|
|
}
|
|
|
- return ofile;
|
|
|
|
|
|
|
+ files.push_back(ofile);
|
|
|
}
|
|
}
|