summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-21 12:46:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-01-21 12:46:20 (GMT)
commitfefae527c8c54d249c44313d9b09cdb0157e2f5d (patch)
treeba1edbd30311d2b66353de84f66a7e2cdb1b2dde /Source/cmCTest.cxx
parent7ac3844ab5a09ad4018c40569ccdc07c313eb407 (diff)
parent2915a75615bab216753c902fa716b11f9fc5de83 (diff)
downloadCMake-fefae527c8c54d249c44313d9b09cdb0157e2f5d.zip
CMake-fefae527c8c54d249c44313d9b09cdb0157e2f5d.tar.gz
CMake-fefae527c8c54d249c44313d9b09cdb0157e2f5d.tar.bz2
Merge topic 'submit-url'
2915a75615 CTest: Add documentation and release notes for SubmitURL d6475daa79 Modules/CTest: Set SubmitURL 938f06fda6 ctest_submit: Add parameter SUBMIT_URL 65e725c957 CTest: Add option SubmitURL 65f1fc9d63 CTest: Add function GetSubmitURL 2bedd5fb7c ctest_submit: Remove submit method from log output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2719
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 1c0d9f6..ded2525 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2626,6 +2626,32 @@ void cmCTest::SetCTestConfiguration(const char* name, const char* value,
this->CTestConfiguration[name] = value;
}
+std::string cmCTest::GetSubmitURL()
+{
+ std::string url = this->GetCTestConfiguration("SubmitURL");
+ if (url.empty()) {
+ std::string method = this->GetCTestConfiguration("DropMethod");
+ std::string user = this->GetCTestConfiguration("DropSiteUser");
+ std::string password = this->GetCTestConfiguration("DropSitePassword");
+ std::string site = this->GetCTestConfiguration("DropSite");
+ std::string location = this->GetCTestConfiguration("DropLocation");
+
+ url = method.empty() ? "http" : method;
+ url += "://";
+ if (!user.empty()) {
+ url += user;
+ if (!password.empty()) {
+ url += ':';
+ url += password;
+ }
+ url += '@';
+ }
+ url += site;
+ url += location;
+ }
+ return url;
+}
+
std::string cmCTest::GetCurrentTag()
{
return this->CurrentTag;