diff options
author | Regina Pfeifer <regina@mailbox.org> | 2018-11-28 22:29:02 +0100 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-16 10:34:08 -0500 |
commit | 65e725c95756a4e2348e9fb52b3d5aca7ee21115 (patch) | |
tree | 028c961332270c4a630bf2a65af9c7ef7bda628e | |
parent | 65f1fc9d6329feb2d48ee986d4243166a66049af (diff) | |
download | cmake-65e725c95756a4e2348e9fb52b3d5aca7ee21115.tar.gz |
CTest: Add option SubmitURL
Fixes: #18610
-rw-r--r-- | Source/CTest/cmCTestSubmitCommand.cxx | 40 | ||||
-rw-r--r-- | Source/cmCTest.cxx | 4 |
2 files changed, 17 insertions, 27 deletions
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 76a1830c1f..e1fe765ad8 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -15,36 +15,26 @@ class cmExecutionStatus; cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() { - const char* ctestDropMethod = - this->Makefile->GetDefinition("CTEST_DROP_METHOD"); - const char* ctestDropSite = this->Makefile->GetDefinition("CTEST_DROP_SITE"); - const char* ctestDropLocation = - this->Makefile->GetDefinition("CTEST_DROP_LOCATION"); - if (!ctestDropMethod) { - ctestDropMethod = "http"; - } + const char* submitURL = this->Makefile->GetDefinition("CTEST_SUBMIT_URL"); - if (!ctestDropSite) { - // error: CDash requires CTEST_DROP_SITE definition - // in CTestConfig.cmake - } - if (!ctestDropLocation) { - // error: CDash requires CTEST_DROP_LOCATION definition - // in CTestConfig.cmake + if (submitURL) { + this->CTest->SetCTestConfiguration("SubmitURL", submitURL, this->Quiet); + } else { + this->CTest->SetCTestConfigurationFromCMakeVariable( + this->Makefile, "DropMethod", "CTEST_DROP_METHOD", this->Quiet); + this->CTest->SetCTestConfigurationFromCMakeVariable( + this->Makefile, "DropSiteUser", "CTEST_DROP_SITE_USER", this->Quiet); + this->CTest->SetCTestConfigurationFromCMakeVariable( + this->Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD", + this->Quiet); + this->CTest->SetCTestConfigurationFromCMakeVariable( + this->Makefile, "DropSite", "CTEST_DROP_SITE", this->Quiet); + this->CTest->SetCTestConfigurationFromCMakeVariable( + this->Makefile, "DropLocation", "CTEST_DROP_LOCATION", this->Quiet); } - this->CTest->SetCTestConfiguration("DropMethod", ctestDropMethod, - this->Quiet); - this->CTest->SetCTestConfiguration("DropSite", ctestDropSite, this->Quiet); - this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation, - this->Quiet); this->CTest->SetCTestConfigurationFromCMakeVariable( this->Makefile, "CurlOptions", "CTEST_CURL_OPTIONS", this->Quiet); - this->CTest->SetCTestConfigurationFromCMakeVariable( - this->Makefile, "DropSiteUser", "CTEST_DROP_SITE_USER", this->Quiet); - this->CTest->SetCTestConfigurationFromCMakeVariable( - this->Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD", - this->Quiet); const char* notesFilesVariable = this->Makefile->GetDefinition("CTEST_NOTES_FILES"); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 881da487c4..219ad14142 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2628,8 +2628,8 @@ void cmCTest::SetCTestConfiguration(const char* name, const char* value, std::string cmCTest::GetSubmitURL() { - std::string url; - { + 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"); |