summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSubmitHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx28
1 files changed, 10 insertions, 18 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index f373348..69f2ac5 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -845,10 +845,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
}
}
cmsysProcess_Delete(cp);
- if (problems) {
- return false;
- }
- return true;
+ return problems == 0;
}
bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
@@ -870,7 +867,6 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
}
cmCTest::SetOfStrings::const_iterator file;
- bool problems = false;
for (file = files.begin(); file != files.end(); ++file) {
std::string lfname = localprefix;
cmSystemTools::ConvertToUnixSlashes(lfname);
@@ -883,9 +879,6 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
}
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
cmSystemTools::Touch(tagDoneFile, true);
- if (problems) {
- return false;
- }
return true;
}
@@ -909,8 +902,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
/* Call the famous server at UserLand. */
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submitting to: "
- << realURL.c_str() << " (" << remoteprefix.c_str()
- << ")" << std::endl,
+ << realURL << " (" << remoteprefix << ")" << std::endl,
this->Quiet);
cmCTest::SetOfStrings::const_iterator file;
for (file = files.begin(); file != files.end(); ++file) {
@@ -921,12 +913,12 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
local_file = localprefix + "/" + *file;
}
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
- " Submit file: " << local_file.c_str() << std::endl,
+ " Submit file: " << local_file << std::endl,
this->Quiet);
struct stat st;
if (::stat(local_file.c_str(), &st)) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
- " Cannot find file: " << local_file.c_str() << std::endl);
+ " Cannot find file: " << local_file << std::endl);
return false;
}
@@ -934,15 +926,15 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
// make sure the file is not too big.
if (static_cast<off_t>(static_cast<size_t>(st.st_size)) !=
static_cast<off_t>(st.st_size)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE,
- " File too big: " << local_file.c_str() << std::endl);
+ cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: " << local_file
+ << std::endl);
return false;
}
size_t fileSize = static_cast<size_t>(st.st_size);
FILE* fp = cmsys::SystemTools::Fopen(local_file.c_str(), "rb");
if (!fp) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
- " Cannot open file: " << local_file.c_str() << std::endl);
+ " Cannot open file: " << local_file << std::endl);
return false;
}
@@ -951,7 +943,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
delete[] fileBuffer;
fclose(fp);
cmCTestLog(this->CTest, ERROR_MESSAGE,
- " Cannot read file: " << local_file.c_str() << std::endl);
+ " Cannot read file: " << local_file << std::endl);
return false;
}
fclose(fp);
@@ -999,12 +991,12 @@ void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
dropMethod = this->CTest->GetCTestConfiguration("DropMethod");
url = dropMethod;
url += "://";
- if (this->CTest->GetCTestConfiguration("DropSiteUser").size() > 0) {
+ if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
url += this->CTest->GetCTestConfiguration("DropSiteUser");
cmCTestOptionalLog(
this->CTest, HANDLER_OUTPUT,
this->CTest->GetCTestConfiguration("DropSiteUser").c_str(), this->Quiet);
- if (this->CTest->GetCTestConfiguration("DropSitePassword").size() > 0) {
+ if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******", this->Quiet);
}