diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2018-09-12 14:39:25 (GMT) |
---|---|---|
committer | Zack Galbreath <zack.galbreath@kitware.com> | 2018-09-17 14:38:33 (GMT) |
commit | 7f530cc54e070257ea0a59ea4f63ab6f34bcf878 (patch) | |
tree | 1cc8272f6faddb9dc243658a78d986b5397255ac /Source/CTest/cmCTestSubmitHandler.cxx | |
parent | 42212f7539040139ecec092547b7d58ef12a4d72 (diff) | |
download | CMake-7f530cc54e070257ea0a59ea4f63ab6f34bcf878.zip CMake-7f530cc54e070257ea0a59ea4f63ab6f34bcf878.tar.gz CMake-7f530cc54e070257ea0a59ea4f63ab6f34bcf878.tar.bz2 |
ctest_submit: pass additional info to CDash
Specify buildname, site, and buildstamp to CDash upon submission.
CDash will use this extra info to assign and report back a buildid.
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index cbed40e..c7f3f39 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -425,6 +425,29 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, ((url.find('?') == std::string::npos) ? '?' : '&') + "FileName=" + ofile; + cmCTestCurl ctest_curl(this->CTest); + upload_as += "&build="; + upload_as += + ctest_curl.Escape(this->CTest->GetCTestConfiguration("BuildName")); + upload_as += "&site="; + upload_as += + ctest_curl.Escape(this->CTest->GetCTestConfiguration("Site")); + upload_as += "&stamp="; + upload_as += ctest_curl.Escape(this->CTest->GetCurrentTag()); + upload_as += "-"; + upload_as += ctest_curl.Escape(this->CTest->GetTestModelString()); + cmCTestScriptHandler* ch = + static_cast<cmCTestScriptHandler*>(this->CTest->GetHandler("script")); + cmake* cm = ch->GetCMake(); + if (cm) { + const char* subproject = + cm->GetState()->GetGlobalProperty("SubProject"); + if (subproject) { + upload_as += "&subproject="; + upload_as += ctest_curl.Escape(subproject); + } + } + upload_as += "&MD5="; if (cmSystemTools::IsOn(this->GetOption("InternalTest"))) { |