summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-11-28 21:11:14 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-16 15:34:08 (GMT)
commit65f1fc9d6329feb2d48ee986d4243166a66049af (patch)
tree9b9f87a6c31164fe0c6e8282b110e95185dad217 /Source/CTest
parent2bedd5fb7c02987ad209f96889e2578a16806e01 (diff)
downloadCMake-65f1fc9d6329feb2d48ee986d4243166a66049af.zip
CMake-65f1fc9d6329feb2d48ee986d4243166a66049af.tar.gz
CMake-65f1fc9d6329feb2d48ee986d4243166a66049af.tar.bz2
CTest: Add function GetSubmitURL
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx39
-rw-r--r--Source/CTest/cmCTestSubmitHandler.h2
2 files changed, 2 insertions, 39 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 7b51059..600194a 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -494,23 +494,6 @@ void cmCTestSubmitHandler::ParseResponse(
}
}
-void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
- std::string& url)
-{
- dropMethod = this->CTest->GetCTestConfiguration("DropMethod");
- url = dropMethod;
- url += "://";
- if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
- url += this->CTest->GetCTestConfiguration("DropSiteUser");
- if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
- url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
- }
- url += "@";
- }
- url += this->CTest->GetCTestConfiguration("DropSite") +
- this->CTest->GetCTestConfiguration("DropLocation");
-}
-
int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
std::string const& typeString)
{
@@ -531,9 +514,7 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
curl.SetCurlOptions(args);
curl.SetTimeOutSeconds(SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT);
curl.SetHttpHeaders(this->HttpHeaders);
- std::string dropMethod;
- std::string url;
- this->ConstructCDashURL(dropMethod, url);
+ std::string url = this->CTest->GetSubmitURL();
std::string fields;
std::string::size_type pos = url.find('?');
if (pos != std::string::npos) {
@@ -878,23 +859,7 @@ int cmCTestSubmitHandler::ProcessHandler()
}
this->SetLogFile(&ofs);
- std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod"));
-
- if (dropMethod.empty()) {
- dropMethod = "http";
- }
-
- std::string url = dropMethod;
- url += "://";
- if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
- url += this->CTest->GetCTestConfiguration("DropSiteUser");
- if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) {
- url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword");
- }
- url += "@";
- }
- url += this->CTest->GetCTestConfiguration("DropSite") +
- this->CTest->GetCTestConfiguration("DropLocation");
+ std::string url = this->CTest->GetSubmitURL();
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
" SubmitURL: " << url << '\n', this->Quiet);
if (!this->SubmitUsingHTTP(buildDirectory + "/Testing/" +
diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h
index 393e826..58f4f97 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -48,8 +48,6 @@ public:
this->HttpHeaders = v;
}
- void ConstructCDashURL(std::string& dropMethod, std::string& url);
-
private:
void SetLogFile(std::ostream* ost) { this->LogFile = ost; }