summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestMemCheckHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestMemCheckHandler.cxx')
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 4835010..fd0388a 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -75,7 +75,7 @@ public:
this->ParseError(atts);
}
// Create the log
- cmOStringStream ostr;
+ std::ostringstream ostr;
ostr << name << ":\n";
int i = 0;
for(; atts[i] != 0; i+=2)
@@ -198,7 +198,7 @@ void cmCTestMemCheckHandler::GenerateTestCommand(
{
std::vector<std::string>::size_type pp;
std::string index;
- cmOStringStream stream;
+ std::ostringstream stream;
std::string memcheckcommand
= cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str());
stream << test;
@@ -834,7 +834,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput(
int defects = 0;
std::vector<std::string> lines;
cmSystemTools::Split(str.c_str(), lines);
- cmOStringStream ostr;
+ std::ostringstream ostr;
log = "";
for( std::vector<std::string>::iterator i = lines.begin();
i != lines.end(); ++i)
@@ -878,7 +878,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
{
std::vector<std::string> lines;
cmSystemTools::Split(str.c_str(), lines);
- cmOStringStream ostr;
+ std::ostringstream ostr;
log = "";
cmsys::RegularExpression pfW("^\\[[WEI]\\] ([A-Z][A-Z][A-Z][A-Z]*): ");
@@ -941,7 +941,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
std::string::size_type cc;
- cmOStringStream ostr;
+ std::ostringstream ostr;
log = "";
int defects = 0;
@@ -1202,6 +1202,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
return;
}
std::string ofile = files[0];
+ if ( ofile.empty() )
+ {
+ return;
+ }
// put a scope around this to close ifs so the file can be removed
{
cmsys::ifstream ifs(ofile.c_str());
@@ -1221,10 +1225,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
}
}
cmSystemTools::Delay(1000);
- cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str());
+ cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
<< this->BoundsCheckerDPBDFile << std::endl);
- cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str());
+ cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
<< this->BoundsCheckerXMLFile << std::endl);
}
@@ -1255,7 +1259,7 @@ cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
}
if(this->LogWithPID)
{
- cmSystemTools::RemoveFile(ofile.c_str());
+ cmSystemTools::RemoveFile(ofile);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "<< ofile <<"\n");
}
}
@@ -1265,7 +1269,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(int test,
files)
{
std::string index;
- cmOStringStream stream;
+ std::ostringstream stream;
stream << test;
index = stream.str();
std::string ofile = this->MemoryTesterOutputFile;