Merge topic 'ctest-error-newlines'

5e7a4ad1a1 ctest: Add missing newlines on several error messages

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8047
This commit is contained in:
Brad King
2023-01-12 14:24:20 +00:00
committed by Kitware Robot
5 changed files with 12 additions and 11 deletions

View File

@@ -165,7 +165,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
if (outstring) {
*outstring = "--build-and-test requires that the generator "
"be provided using the --build-generator "
"command line option. ";
"command line option.\n";
}
return 1;
}

View File

@@ -112,7 +112,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
{
response.clear();
if (!this->InitCurl()) {
cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed");
cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed\n");
return false;
}
/* enable uploading */
@@ -176,7 +176,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
if (response.empty()) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"No response from server.\n"
<< curlDebug);
<< curlDebug << std::endl);
return false;
}
return true;
@@ -192,7 +192,7 @@ bool cmCTestCurl::HttpRequest(std::string const& url,
<< "fields " << fields << "\n",
this->Quiet);
if (!this->InitCurl()) {
cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed");
cmCTestLog(this->CTest, ERROR_MESSAGE, "Initialization of curl failed\n");
return false;
}
curl_easy_setopt(this->Curl, CURLOPT_POST, 1);

View File

@@ -117,7 +117,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
if (!name) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot create resulting XML file without providing the name"
<< std::endl;);
<< std::endl);
return false;
}
std::ostringstream ostr;
@@ -153,7 +153,7 @@ bool cmCTestGenericHandler::StartLogFile(const char* name,
if (!name) {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Cannot create log file without providing the name"
<< std::endl;);
<< std::endl);
return false;
}
std::ostringstream ostr;

View File

@@ -143,7 +143,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
"BuildDirectory", cmSystemTools::CollapseFullPath(bdir), this->Quiet);
} else {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"CTEST_BINARY_DIRECTORY not set" << std::endl;);
"CTEST_BINARY_DIRECTORY not set" << std::endl);
}
}
if (!this->Source.empty()) {
@@ -164,7 +164,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
this->CTest->SetCTestConfiguration("ChangeId", *changeId, this->Quiet);
}
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;);
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl);
cmCTestGenericHandler* handler = this->InitializeHandler();
if (!handler) {
cmCTestLog(this->CTest, ERROR_MESSAGE,

View File

@@ -1691,7 +1691,7 @@ bool cmCTest::SubmitExtraFiles(std::vector<std::string> const& files)
if (!cmSystemTools::FileExists(file)) {
cmCTestLog(this, ERROR_MESSAGE,
"Cannot find extra file: " << file << " to submit."
<< std::endl;);
<< std::endl);
return false;
}
this->AddSubmitFile(PartExtraFiles, file);
@@ -2757,8 +2757,9 @@ int cmCTest::Run(std::vector<std::string>& args, std::string* output)
// intended
for (auto& handler : this->Impl->GetTestingHandlers()) {
if (!handler->ProcessCommandLineArguments(arg, i, args)) {
cmCTestLog(this, ERROR_MESSAGE,
"Problem parsing command line arguments within a handler");
cmCTestLog(
this, ERROR_MESSAGE,
"Problem parsing command line arguments within a handler\n");
return 0;
}
}