summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx2
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx2
-rw-r--r--Source/CTest/cmCTestConfigureHandler.cxx4
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx88
-rw-r--r--Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx2
-rw-r--r--Source/CTest/cmCTestGenericHandler.cxx4
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx16
-rw-r--r--Source/CTest/cmCTestMultiProcessHandler.cxx2
-rw-r--r--Source/CTest/cmCTestRunTest.cxx28
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx20
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx46
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx14
-rw-r--r--Source/CTest/cmCTestUpdateHandler.cxx2
-rw-r--r--Source/CTest/cmCTestUploadHandler.cxx2
14 files changed, 116 insertions, 116 deletions
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index de42e2b..f81083a 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -134,7 +134,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmakeBuildAdditionalFlags ? cmakeBuildAdditionalFlags : "", true);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"SetMakeCommand:"
- << buildCommand.c_str() << "\n");
+ << buildCommand << "\n");
this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
}
else
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 291c70a..7922c9a 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -409,7 +409,7 @@ int cmCTestBuildHandler::ProcessHandler()
for ( it = strings.begin(); it != strings.end(); ++it ) \
{ \
cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \
- << it->c_str() << std::endl); \
+ << *it << std::endl); \
regexes.push_back(it->c_str()); \
}
cmCTestBuildHandlerPopulateRegexVector(
diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx
index 7c41298..a6e39a4 100644
--- a/Source/CTest/cmCTestConfigureHandler.cxx
+++ b/Source/CTest/cmCTestConfigureHandler.cxx
@@ -76,7 +76,7 @@ int cmCTestConfigureHandler::ProcessHandler()
cmGeneratedFileStream ofs;
this->StartLogFile("Configure", ofs);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: "
- << cCommand.c_str() << std::endl);
+ << cCommand << std::endl);
res = this->CTest->RunMakeCommand(cCommand.c_str(), &output,
&retVal, buildDirectory.c_str(),
0, ofs);
@@ -99,7 +99,7 @@ int cmCTestConfigureHandler::ProcessHandler()
{
os << retVal;
}
- os << "<ConfigureCommand>" << cCommand.c_str() << "</ConfigureCommand>"
+ os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
<< std::endl;
cmCTestLog(this->CTest, DEBUG, "End" << std::endl);
os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 2c21a13..f0b1124 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -269,7 +269,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
fFile.c_str(), checkDir.c_str());
if ( ndc.size() )
{
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc.c_str()
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
<< " so skip coverage of " << file << std::endl);
return false;
}
@@ -308,7 +308,7 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file,
fFile.c_str(), checkDir.c_str());
if ( ndc.size() )
{
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc.c_str()
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc
<< " so skip coverage of: " << file << std::endl);
return false;
}
@@ -477,7 +477,7 @@ int cmCTestCoverageHandler::ProcessHandler()
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
".NoDartCoverage found, so skip coverage check for: "
- << fullFileName.c_str()
+ << fullFileName
<< std::endl);
continue;
}
@@ -488,7 +488,7 @@ int cmCTestCoverageHandler::ProcessHandler()
if ( !cmSystemTools::FileExists(fullFileName.c_str()) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
- << fullFileName.c_str() << std::endl);
+ << fullFileName << std::endl);
continue;
}
@@ -516,7 +516,7 @@ int cmCTestCoverageHandler::ProcessHandler()
if ( !ifs)
{
cmOStringStream ostr;
- ostr << "Cannot open source file: " << fullFileName.c_str();
+ ostr << "Cannot open source file: " << fullFileName;
errorsWhileAccumulating.push_back(ostr.str());
error ++;
continue;
@@ -535,7 +535,7 @@ int cmCTestCoverageHandler::ProcessHandler()
cc != fcov.size() -1 )
{
cmOStringStream ostr;
- ostr << "Problem reading source file: " << fullFileName.c_str()
+ ostr << "Problem reading source file: " << fullFileName
<< " line:" << cc << " out total: " << fcov.size()-1;
errorsWhileAccumulating.push_back(ostr.str());
error ++;
@@ -605,7 +605,7 @@ int cmCTestCoverageHandler::ProcessHandler()
if (!ifs)
{
cmOStringStream ostr;
- ostr << "Cannot open source file: " << fullPath.c_str();
+ ostr << "Cannot open source file: " << fullPath;
errorsWhileAccumulating.push_back(ostr.str());
error ++;
continue;
@@ -613,7 +613,7 @@ int cmCTestCoverageHandler::ProcessHandler()
int untested = 0;
std::string line;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Actually performing coverage for: " << i->c_str() << std::endl);
+ "Actually performing coverage for: " << *i << std::endl);
while (cmSystemTools::GetLineFromStream(ifs, line))
{
covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
@@ -647,7 +647,7 @@ int cmCTestCoverageHandler::ProcessHandler()
++ erIt )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
- " " << erIt->c_str() << std::endl);
+ " " << *erIt << std::endl);
}
}
@@ -719,13 +719,13 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf)
++ it )
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage exclude: "
- << it->c_str() << std::endl);
+ << *it << std::endl);
}
for ( it = this->ExtraCoverageGlobs.begin();
it != this->ExtraCoverageGlobs.end(); ++it)
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage glob: "
- << it->c_str() << std::endl);
+ << *it << std::endl);
}
}
@@ -959,17 +959,17 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
std::string output = "";
std::string errors = "";
int retVal = 0;
- *cont->OFS << "* Run coverage for: " << fileDir.c_str() << std::endl;
- *cont->OFS << " Command: " << command.c_str() << std::endl;
+ *cont->OFS << "* Run coverage for: " << fileDir << std::endl;
+ *cont->OFS << " Command: " << command << std::endl;
int res = this->CTest->RunCommand(command.c_str(), &output, &errors,
&retVal, tempDir.c_str(), 0 /*this->TimeOut*/);
- *cont->OFS << " Output: " << output.c_str() << std::endl;
- *cont->OFS << " Errors: " << errors.c_str() << std::endl;
+ *cont->OFS << " Output: " << output << std::endl;
+ *cont->OFS << " Errors: " << errors << std::endl;
if ( ! res )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Problem running coverage on file: " << it->c_str() << std::endl);
+ "Problem running coverage on file: " << *it << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Command produced error: " << errors << std::endl);
cont->Error ++;
@@ -978,7 +978,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
if ( retVal != 0 )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
- << retVal << " while processing: " << it->c_str() << std::endl);
+ << retVal << " while processing: " << *it << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Command produced error: " << cont->Error << std::endl);
}
@@ -999,7 +999,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
std::string sourceFile;
std::string gcovFile;
- cmCTestLog(this->CTest, DEBUG, "Line: [" << line->c_str() << "]"
+ cmCTestLog(this->CTest, DEBUG, "Line: [" << *line << "]"
<< std::endl);
if ( line->size() == 0 )
@@ -1145,7 +1145,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
!cmSystemTools::StringStartsWith(line->c_str(), "Removing "))
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Unknown gcov output line: [" << line->c_str() << "]"
+ "Unknown gcov output line: [" << *line << "]"
<< std::endl);
cont->Error ++;
//abort();
@@ -1238,8 +1238,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
if ( IsFileInDir(sourceFile, cont->SourceDir) )
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced s: "
- << sourceFile.c_str() << std::endl);
- *cont->OFS << " produced in source dir: " << sourceFile.c_str()
+ << sourceFile << std::endl);
+ *cont->OFS << " produced in source dir: " << sourceFile
<< std::endl;
actualSourceFile
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
@@ -1247,8 +1247,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
else if ( IsFileInDir(sourceFile, cont->BinaryDir) )
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced b: "
- << sourceFile.c_str() << std::endl);
- *cont->OFS << " produced in binary dir: " << sourceFile.c_str()
+ << sourceFile << std::endl);
+ *cont->OFS << " produced in binary dir: " << sourceFile
<< std::endl;
actualSourceFile
= cmSystemTools::CollapseFullPath(sourceFile.c_str());
@@ -1262,19 +1262,19 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
"Something went wrong" << std::endl);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Cannot find file: ["
- << sourceFile.c_str() << "]" << std::endl);
+ << sourceFile << "]" << std::endl);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" in source dir: ["
- << cont->SourceDir.c_str() << "]"
+ << cont->SourceDir << "]"
<< std::endl);
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" or binary dir: ["
<< cont->BinaryDir.size() << "]"
<< std::endl);
*cont->OFS << " Something went wrong. Cannot find file: "
- << sourceFile.c_str()
- << " in source dir: " << cont->SourceDir.c_str()
- << " or binary dir: " << cont->BinaryDir.c_str() << std::endl;
+ << sourceFile
+ << " in source dir: " << cont->SourceDir
+ << " or binary dir: " << cont->BinaryDir << std::endl;
missingFiles.insert(sourceFile);
}
@@ -1364,24 +1364,24 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot find source Python file corresponding to: "
- << fileIt->c_str() << std::endl);
+ << *fileIt << std::endl);
continue;
}
std::string actualSourceFile
= cmSystemTools::CollapseFullPath(fileName.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- " Check coverage for file: " << actualSourceFile.c_str()
+ " Check coverage for file: " << actualSourceFile
<< std::endl);
cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec
= &cont->TotalCoverage[actualSourceFile];
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- " in file: " << fileIt->c_str() << std::endl);
+ " in file: " << *fileIt << std::endl);
cmsys::ifstream ifile(fileIt->c_str());
if ( ! ifile )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: "
- << fileIt->c_str() << std::endl);
+ << *fileIt << std::endl);
}
else
{
@@ -1429,7 +1429,7 @@ int cmCTestCoverageHandler::HandleTracePyCoverage(
// So, this will be set to 0.
cov = 0;
}
- cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix.c_str()
+ cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix
<< " cov: " << cov
<< std::endl);
// Read the line number starting at the 10th character of the gcov
@@ -1542,7 +1542,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot open coverage file: " <<
- outputFile.c_str() << std::endl);
+ outputFile << std::endl);
return 0;
}
std::map<std::string, std::string> fileMap;
@@ -1602,7 +1602,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
count++;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Produce coverage for file: "
- << file.c_str() << " " << count
+ << file << " " << count
<< std::endl);
// start the file output
covLogFile << "\t<File Name=\""
@@ -1663,12 +1663,12 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
if(arg)
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Run : " << program.c_str() << " " << arg << "\n");
+ "Run : " << program << " " << arg << "\n");
}
else
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Run : " << program.c_str() << "\n");
+ "Run : " << program << "\n");
}
// create a process object and start it
cmCTestRunProcess runCoverageSrc;
@@ -1686,7 +1686,7 @@ int cmCTestCoverageHandler::RunBullseyeCommand(
if(!runCoverageSrc.StartProcess())
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not run : "
- << program.c_str() << " " << arg << "\n"
+ << program << " " << arg << "\n"
<< "kwsys process state : "
<< runCoverageSrc.GetProcessState());
return 0;
@@ -1755,7 +1755,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot open coverage summary file: " <<
- outputFile.c_str() << std::endl);
+ outputFile << std::endl);
return 0;
}
std::set<std::string> coveredFileNames;
@@ -1796,14 +1796,14 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
".NoDartCoverage found, so skip coverage check for: "
- << file.c_str()
+ << file
<< std::endl);
continue;
}
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Doing coverage for: "
- << file.c_str()
+ << file
<< std::endl);
coveredFiles.push_back(sourceFile);
@@ -1830,7 +1830,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
cmet /= 2.0f;
}
cmet /= 100.0f;
- tmpLog << stdline.c_str() << "\n";
+ tmpLog << stdline << "\n";
tmpLog << fileName << "\n";
tmpLog << "functionsCalled: " << functionsCalled/100 << "\n";
tmpLog << "totalFunctions: " << totalFunctions/100 << "\n";
@@ -1957,7 +1957,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
if(pos == inputLine.npos)
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : "
- << inputLine.c_str() << "\n");
+ << inputLine << "\n");
return false;
}
// the source file has "" around it so extract out the file name
@@ -1991,7 +1991,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
if(pos != inputLine.npos)
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
- << inputLine.c_str() << " last pos not npos = " << pos <<
+ << inputLine << " last pos not npos = " << pos <<
"\n");
}
return true;
diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
index a470b3b..5ddef01 100644
--- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
+++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx
@@ -25,7 +25,7 @@ bool cmCTestEmptyBinaryDirectoryCommand
if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) )
{
cmOStringStream ostr;
- ostr << "problem removing the binary directory: " << args[0].c_str();
+ ostr << "problem removing the binary directory: " << args[0];
this->SetError(ostr.str());
return false;
}
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx
index 08cfaec..2df2229 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -124,7 +124,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
ostr.str(), xofs, true) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Cannot create resulting XML file: " << ostr.str().c_str()
+ "Cannot create resulting XML file: " << ostr.str()
<< std::endl);
return false;
}
@@ -156,7 +156,7 @@ bool cmCTestGenericHandler::StartLogFile(const char* name,
if( !this->CTest->OpenOutputFile("Temporary", ostr.str(), xofs) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create log file: "
- << ostr.str().c_str() << std::endl);
+ << ostr.str() << std::endl);
return false;
}
return true;
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index f27dbc0..ecaa474 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -514,7 +514,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot find memory checker suppression file: "
<< this->CTest->GetCTestConfiguration(
- "MemoryCheckSuppressionFile").c_str() << std::endl);
+ "MemoryCheckSuppressionFile") << std::endl);
return false;
}
std::string suppressions = "--suppressions="
@@ -569,7 +569,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
}
default:
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Do not understand memory checker: " << this->MemoryTester.c_str()
+ "Do not understand memory checker: " << this->MemoryTester
<< std::endl);
return false;
}
@@ -885,7 +885,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
else if(!parser.ParseChunk(theLine.c_str(), theLine.size()))
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
- "Error in ParseChunk: " << theLine.c_str()
+ "Error in ParseChunk: " << theLine
<< std::endl);
}
}
@@ -916,7 +916,7 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"PostProcessBoundsCheckerTest for : "
- << res.Name.c_str() << std::endl);
+ << res.Name << std::endl);
std::string ofile = testOutputFileName(test);
if ( ofile.empty() )
{
@@ -943,10 +943,10 @@ cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res,
cmSystemTools::Delay(1000);
cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
- << this->BoundsCheckerDPBDFile.c_str() << std::endl);
+ << this->BoundsCheckerDPBDFile << std::endl);
cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: "
- << this->BoundsCheckerXMLFile.c_str() << std::endl);
+ << this->BoundsCheckerXMLFile << std::endl);
}
void
@@ -955,7 +955,7 @@ cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res,
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"PostProcessPurifyTest for : "
- << res.Name.c_str() << std::endl);
+ << res.Name << std::endl);
appendMemTesterOutput(res, test);
}
@@ -965,7 +965,7 @@ cmCTestMemCheckHandler::PostProcessValgrindTest(cmCTestTestResult& res,
{
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"PostProcessValgrindTest for : "
- << res.Name.c_str() << std::endl);
+ << res.Name << std::endl);
appendMemTesterOutput(res, test);
}
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index c979be3..b9e6721 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -672,7 +672,7 @@ void cmCTestMultiProcessHandler::PrintTestList()
indexStr << " #" << p.Index << ":";
cmCTestLog(this->CTest, HANDLER_OUTPUT,
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
- << indexStr.str().c_str());
+ << indexStr.str());
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
cmCTestLog(this->CTest, HANDLER_OUTPUT, p.Name.c_str() << std::endl);
//pop working dir
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index cdf90b9..385388d 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -334,9 +334,9 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
*this->TestHandler->LogFile << "Test Failed.\n";
}
}
- *this->TestHandler->LogFile << "\"" << this->TestProperties->Name.c_str()
+ *this->TestHandler->LogFile << "\"" << this->TestProperties->Name
<< "\" end time: " << this->CTest->CurrentTime() << std::endl
- << "\"" << this->TestProperties->Name.c_str() << "\" time elapsed: "
+ << "\"" << this->TestProperties->Name << "\" time elapsed: "
<< buffer << std::endl
<< "----------------------------------------------------------"
<< std::endl << std::endl;
@@ -388,8 +388,8 @@ void cmCTestRunTest::MemCheckPostProcess()
}
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
<< ": process test output now: "
- << this->TestProperties->Name.c_str() << " "
- << this->TestResult.Name.c_str() << std::endl);
+ << this->TestProperties->Name << " "
+ << this->TestResult.Name << std::endl);
cmCTestMemCheckHandler * handler = static_cast<cmCTestMemCheckHandler*>
(this->TestHandler);
switch ( handler->MemoryTesterStyle )
@@ -465,9 +465,9 @@ bool cmCTestRunTest::StartTest(size_t total)
//Required file was not found
this->TestProcess = new cmProcess;
*this->TestHandler->LogFile << "Unable to find required file: "
- << file.c_str() << std::endl;
+ << file << std::endl;
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find required file: "
- << file.c_str() << std::endl);
+ << file << std::endl);
this->TestResult.Output = "Unable to find required file: " + file;
this->TestResult.FullCommandLine = "";
this->TestResult.CompletionStatus = "Not Run";
@@ -482,9 +482,9 @@ bool cmCTestRunTest::StartTest(size_t total)
// that has that information
this->TestProcess = new cmProcess;
*this->TestHandler->LogFile << "Unable to find executable: "
- << args[1].c_str() << std::endl;
+ << args[1] << std::endl;
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find executable: "
- << args[1].c_str() << std::endl);
+ << args[1] << std::endl);
this->TestResult.Output = "Unable to find executable: " + args[1];
this->TestResult.FullCommandLine = "";
this->TestResult.CompletionStatus = "Not Run";
@@ -711,7 +711,7 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
indexStr << " #" << this->Index << ":";
cmCTestLog(this->CTest, HANDLER_OUTPUT,
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
- << indexStr.str().c_str());
+ << indexStr.str());
cmCTestLog(this->CTest, HANDLER_OUTPUT, " ");
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
std::string outname = this->TestProperties->Name + " ";
@@ -722,18 +722,18 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
<< this->TestProperties->Name << std::endl;
*this->TestHandler->LogFile << this->TestProperties->Index << "/"
<< this->TestHandler->TotalNumberOfTests
- << " Test: " << this->TestProperties->Name.c_str() << std::endl;
+ << " Test: " << this->TestProperties->Name << std::endl;
*this->TestHandler->LogFile << "Command: \"" << this->ActualCommand << "\"";
for (std::vector<std::string>::iterator i = this->Arguments.begin();
i != this->Arguments.end(); ++i)
{
*this->TestHandler->LogFile
- << " \"" << i->c_str() << "\"";
+ << " \"" << *i << "\"";
}
*this->TestHandler->LogFile << std::endl
<< "Directory: " << this->TestProperties->Directory << std::endl
- << "\"" << this->TestProperties->Name.c_str() << "\" start time: "
+ << "\"" << this->TestProperties->Name << "\" start time: "
<< this->StartTime << std::endl;
*this->TestHandler->LogFile
@@ -741,9 +741,9 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
<< "----------------------------------------------------------"
<< std::endl;
*this->TestHandler->LogFile
- << this->ProcessOutput.c_str() << "<end of output>" << std::endl;
+ << this->ProcessOutput << "<end of output>" << std::endl;
cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str());
cmCTestLog(this->CTest, DEBUG, "Testing "
- << this->TestProperties->Name.c_str() << " ... ");
+ << this->TestProperties->Name << " ... ");
}
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 4d419c2..567acfc 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -426,7 +426,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
cmSystemTools::GetErrorOccuredFlag())
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
- << systemFile.c_str() << "\n");
+ << systemFile << "\n");
return 2;
}
@@ -444,7 +444,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
cmSystemTools::GetErrorOccuredFlag())
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: "
- << script.c_str()
+ << script
<< std::endl);
// Reset the error flag so that it can run more than
// one script with an error when you
@@ -781,7 +781,7 @@ int cmCTestScriptHandler::PerformExtraUpdates()
output = "";
retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run Update: "
- << fullCommand.c_str() << std::endl);
+ << fullCommand << std::endl);
res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output,
&retVal, cvsArgs[0].c_str(),
this->HandlerVerbose, 0 /*this->TimeOut*/);
@@ -902,7 +902,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
command += "\"";
retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run cmake command: "
- << command.c_str() << std::endl);
+ << command << std::endl);
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
&retVal, this->BinaryDir.c_str(),
this->HandlerVerbose, 0 /*this->TimeOut*/);
@@ -916,7 +916,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
}
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Write CMake output to file: " << cmakeOutputFile.c_str()
+ "Write CMake output to file: " << cmakeOutputFile
<< std::endl);
cmGeneratedFileStream fout(cmakeOutputFile.c_str());
if ( fout )
@@ -927,7 +927,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot open CMake output file: "
- << cmakeOutputFile.c_str() << " for writing" << std::endl);
+ << cmakeOutputFile << " for writing" << std::endl);
}
}
if (!res || retVal != 0)
@@ -948,7 +948,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
output = "";
retVal = 0;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run ctest command: "
- << command.c_str() << std::endl);
+ << command << std::endl);
res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
&retVal, this->BinaryDir.c_str(), this->HandlerVerbose,
0 /*this->TimeOut*/);
@@ -962,13 +962,13 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Unable to run cmake:" << std::endl
- << cmakeFailedOuput.c_str() << std::endl);
+ << cmakeFailedOuput << std::endl);
return 10;
}
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Unable to run ctest:" << std::endl
- << "command: " << command.c_str() << std::endl
- << "output: " << output.c_str() << std::endl);
+ << "command: " << command << std::endl
+ << "output: " << output << std::endl);
if (!res)
{
return 11;
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index bc3c333..7c72cba 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -229,18 +229,18 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
if ( ::stat(local_file.c_str(), &st) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
- << local_file.c_str() << std::endl);
+ << local_file << std::endl);
::curl_easy_cleanup(curl);
::curl_global_cleanup();
return false;
}
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
- *this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
- << upload_as.c_str() << std::endl;
+ *this->LogFile << "\tUpload file: " << local_file << " to "
+ << upload_as << std::endl;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
- << local_file.c_str() << " to "
- << upload_as.c_str() << std::endl);
+ << local_file << " to "
+ << upload_as << std::endl);
::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
@@ -290,11 +290,11 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Error when uploading file: "
- << local_file.c_str() << std::endl);
+ << local_file << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
<< error_buffer << std::endl);
*this->LogFile << " Error when uploading file: "
- << local_file.c_str()
+ << local_file
<< std::endl
<< " Error message was: "
<< error_buffer << std::endl
@@ -422,8 +422,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
std::string remote_file
= remoteprefix + cmSystemTools::GetFilenameName(*file);
- *this->LogFile << "\tUpload file: " << local_file.c_str() << " to "
- << remote_file.c_str() << std::endl;
+ *this->LogFile << "\tUpload file: " << local_file << " to "
+ << remote_file << std::endl;
std::string ofile = "";
for ( kk = 0; kk < remote_file.size(); kk ++ )
@@ -470,7 +470,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
if ( ::stat(local_file.c_str(), &st) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: "
- << local_file.c_str() << std::endl);
+ << local_file << std::endl);
::curl_easy_cleanup(curl);
::curl_global_cleanup();
return false;
@@ -478,8 +478,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
ftpfile = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: "
- << local_file.c_str() << " to "
- << upload_as.c_str() << " Size: " << st.st_size << std::endl);
+ << local_file << " to "
+ << upload_as << " Size: " << st.st_size << std::endl);
// specify target
::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str());
@@ -595,11 +595,11 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
" Error when uploading file: "
- << local_file.c_str() << std::endl);
+ << local_file << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
<< error_buffer << std::endl);
*this->LogFile << " Error when uploading file: "
- << local_file.c_str()
+ << local_file
<< std::endl
<< " Error message was: " << error_buffer
<< std::endl;
@@ -750,15 +750,15 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
std::string turl
= url + ((url.find("?",0) == std::string::npos) ? "?" : "&")
+ "xmlfile=" + ofile;
- *this->LogFile << "Trigger url: " << turl.c_str() << std::endl;
+ *this->LogFile << "Trigger url: " << turl << std::endl;
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Trigger url: "
- << turl.c_str() << std::endl);
+ << turl << std::endl);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
if ( curl_easy_perform(curl) )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when triggering: "
- << turl.c_str() << std::endl);
+ << turl << std::endl);
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: "
<< error_buffer << std::endl);
*this->LogFile << "\tTriggering failed with error: " << error_buffer
@@ -932,8 +932,8 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
std::string rfname = destination + "/" + remoteprefix + *file;
cmSystemTools::CopyFileAlways(lfname.c_str(), rfname.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
- << lfname.c_str() << " to "
- << rfname.c_str() << std::endl);
+ << lfname << " to "
+ << rfname << std::endl);
}
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
cmSystemTools::Touch(tagDoneFile.c_str(), true);
@@ -1183,7 +1183,7 @@ int cmCTestSubmitHandler::ProcessHandler()
= buildDirectory + "/Testing/" + this->CTest->GetCurrentTag();
std::string::size_type glen = gpath.size() + 1;
gpath = gpath + "/CoverageLog*";
- cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath.c_str()
+ cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath
<< std::endl);
if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) )
{
@@ -1191,7 +1191,7 @@ int cmCTestSubmitHandler::ProcessHandler()
for ( cc = 0; cc < gfiles.size(); cc ++ )
{
gfiles[cc] = gfiles[cc].substr(glen);
- cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc].c_str()
+ cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc]
<< std::endl);
this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfiles[cc].c_str());
}
@@ -1232,7 +1232,7 @@ int cmCTestSubmitHandler::ProcessHandler()
cmCTest::SetOfStrings::iterator it;
for ( it = files.begin(); it != files.end(); ++ it )
{
- ofs << cnt << "\t" << it->c_str() << std::endl;
+ ofs << cnt << "\t" << *it << std::endl;
cnt ++;
}
}
@@ -1448,7 +1448,7 @@ int cmCTestSubmitHandler::ProcessHandler()
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(buildDirectory.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
- << buildDirectory.c_str() << std::endl);
+ << buildDirectory << std::endl);
if ( !this->SubmitUsingCP(
"Testing/"+this->CTest->GetCurrentTag(),
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index efeb658..1d1dde4 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -616,7 +616,7 @@ int cmCTestTestHandler::ProcessHandler()
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
<< ftit->TestCount << " - "
- << ftit->Name.c_str() << " ("
+ << ftit->Name << " ("
<< this->GetTestStatus(ftit->Status) << ")"
<< std::endl);
}
@@ -1022,7 +1022,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
{
cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: "
- << tag << " found [" << line.c_str() << "]" << std::endl);
+ << tag << " found [" << line << "]" << std::endl);
ret = false;
}
return ret;
@@ -1223,7 +1223,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
{
os
<< "\t\t\t<NamedMeasurement type=\"text/string\" "
- << "name=\"" << measureIt->first.c_str() << "\"><Value>"
+ << "name=\"" << measureIt->first << "\"><Value>"
<< cmXMLSafe(measureIt->second)
<< "</Value></NamedMeasurement>\n";
}
@@ -1820,7 +1820,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
else if ( !this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels() )
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
- << lastTestsFailedLog.c_str() <<
+ << lastTestsFailedLog <<
" while generating list of previously failed tests." << std::endl);
}
}
@@ -1960,7 +1960,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
<< " " << k1 << "=\"" << v1 << "\""
<< " " << k2 << "=\"" << v2 << "\""
<< " encoding=\"none\""
- << "><Value>Image " << filename.c_str()
+ << "><Value>Image " << filename
<< " is empty</Value></NamedMeasurement>";
}
else
@@ -2014,10 +2014,10 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
<< "\t\t\t<NamedMeasurement"
<< " name=\"" << measurementfile.match(idx) << "\""
<< " text=\"text/string\""
- << "><Value>File " << filename.c_str()
+ << "><Value>File " << filename
<< " not found</Value></NamedMeasurement>"
<< std::endl;
- cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename.c_str()
+ cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename
<< "\" not found." << std::endl);
}
cxml.erase(measurementfile.start(),
diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx
index 11474ec..fda61ea 100644
--- a/Source/CTest/cmCTestUpdateHandler.cxx
+++ b/Source/CTest/cmCTestUpdateHandler.cxx
@@ -331,7 +331,7 @@ int cmCTestUpdateHandler::DetectVCS(const char* dir)
{
std::string sourceDirectory = dir;
cmCTestLog(this->CTest, DEBUG, "Check directory: "
- << sourceDirectory.c_str() << std::endl);
+ << sourceDirectory << std::endl);
sourceDirectory += "/.svn";
if ( cmSystemTools::FileExists(sourceDirectory.c_str()) )
{
diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx
index caf2e53..4c3f81b 100644
--- a/Source/CTest/cmCTestUploadHandler.cxx
+++ b/Source/CTest/cmCTestUploadHandler.cxx
@@ -64,7 +64,7 @@ int cmCTestUploadHandler::ProcessHandler()
for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
{
cmCTestLog(this->CTest, OUTPUT,
- "\tUpload file: " << it->c_str() << std::endl);
+ "\tUpload file: " << *it << std::endl);
ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
<< "<Content encoding=\"base64\">\n";
ofs << this->CTest->Base64EncodeFile(*it);