diff options
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index ccd74c0..4959288 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -429,7 +429,7 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) } } - cmake cm(cmake::RoleScript); + cmake cm(cmake::RoleScript, cmState::CTest); cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cm.GetCurrentSnapshot().SetDefaultDefinitions(); @@ -2629,6 +2629,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; |