diff options
author | Brad King <brad.king@kitware.com> | 2018-06-27 19:10:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-27 19:10:56 (GMT) |
commit | decfdec63fefe2d4e9628fa247e701bf1b8c4a57 (patch) | |
tree | ed7f41fd3370aebccc49654ef8797a25f484a978 | |
parent | 2ba71a11e3b09fb4a9aa6a98ba3d8302fff02dc2 (diff) | |
parent | 71f27c04b097e4fefb0ec64536c8e21161fc99b0 (diff) | |
download | CMake-decfdec63fefe2d4e9628fa247e701bf1b8c4a57.zip CMake-decfdec63fefe2d4e9628fa247e701bf1b8c4a57.tar.gz CMake-decfdec63fefe2d4e9628fa247e701bf1b8c4a57.tar.bz2 |
Merge branch 'ctest_submit-https' into release-3.12
Merge-request: !2171
-rw-r--r-- | Source/CTest/cmCTestCurl.cxx | 6 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 2 | ||||
-rw-r--r-- | Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 13 |
4 files changed, 14 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index f7b5930..6eb4354 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -3,6 +3,7 @@ #include "cmCTestCurl.h" #include "cmCTest.h" +#include "cmCurl.h" #include "cmSystemTools.h" #include <ostream> @@ -76,6 +77,7 @@ bool cmCTestCurl::InitCurl() if (!this->Curl) { return false; } + cmCurlSetCAInfo(this->Curl); if (this->VerifyPeerOff) { curl_easy_setopt(this->Curl, CURLOPT_SSL_VERIFYPEER, 0); } @@ -146,7 +148,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, ::curl_slist_append(nullptr, "Content-Type: text/xml"); // Add any additional headers that the user specified. for (std::string const& h : this->HttpHeaders) { - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, + cmCTestOptionalLog(this->CTest, DEBUG, " Add HTTP Header: \"" << h << "\"" << std::endl, this->Quiet); headers = ::curl_slist_append(headers, h.c_str()); @@ -214,7 +216,7 @@ bool cmCTestCurl::HttpRequest(std::string const& url, struct curl_slist* headers = nullptr; if (!this->HttpHeaders.empty()) { for (std::string const& h : this->HttpHeaders) { - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, + cmCTestOptionalLog(this->CTest, DEBUG, " Add HTTP Header: \"" << h << "\"" << std::endl, this->Quiet); headers = ::curl_slist_append(headers, h.c_str()); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index cae3d4c..4c2b75e 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -314,7 +314,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, // Add any additional headers that the user specified. for (std::string const& h : this->HttpHeaders) { - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, + cmCTestOptionalLog(this->CTest, DEBUG, " Add HTTP Header: \"" << h << "\"" << std::endl, this->Quiet); headers = ::curl_slist_append(headers, h.c_str()); diff --git a/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt b/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt index 4825d7a..a8f10b5 100644 --- a/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt +++ b/Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stderr.txt @@ -1,3 +1 @@ - *Error when uploading file: .*/Configure.xml *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) - *Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index b5d90d2..ed0e666 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -5,14 +5,19 @@ set(CASE_DROP_METHOD "http") set(CASE_DROP_SITE "-no-site-") set(CASE_CTEST_SUBMIT_ARGS "") -#----------------------------------------------------------------------------- -# Test bad argument combinations. function(run_ctest_submit CASE_NAME) set(CASE_CTEST_SUBMIT_ARGS "${ARGN}") run_ctest(${CASE_NAME}) endfunction() +function(run_ctest_submit_debug CASE_NAME) + set(CASE_CTEST_SUBMIT_ARGS "${ARGN}") + run_ctest(${CASE_NAME} "--debug") +endfunction() + +#----------------------------------------------------------------------------- +# Test bad argument combinations. run_ctest_submit(BadArg bad-arg) run_ctest_submit(BadPARTS PARTS bad-part) run_ctest_submit(BadFILES FILES bad-file) @@ -25,8 +30,8 @@ run_ctest_submit(CDashUploadNone CDASH_UPLOAD) run_ctest_submit(CDashUploadMissingFile CDASH_UPLOAD bad-upload) run_ctest_submit(CDashUploadRetry CDASH_UPLOAD ${CMAKE_CURRENT_LIST_FILE} CDASH_UPLOAD_TYPE foo RETRY_COUNT 2 RETRY_DELAY 1 INTERNAL_TEST_CHECKSUM) run_ctest_submit(CDashSubmitQuiet QUIET) -run_ctest_submit(CDashSubmitHeaders HTTPHEADER "Authorization: Bearer asdf") -run_ctest_submit(CDashUploadHeaders CDASH_UPLOAD ${CMAKE_CURRENT_LIST_FILE} CDASH_UPLOAD_TYPE foo HTTPHEADER "Authorization: Bearer asdf") +run_ctest_submit_debug(CDashSubmitHeaders HTTPHEADER "Authorization: Bearer asdf") +run_ctest_submit_debug(CDashUploadHeaders CDASH_UPLOAD ${CMAKE_CURRENT_LIST_FILE} CDASH_UPLOAD_TYPE foo HTTPHEADER "Authorization: Bearer asdf") function(run_ctest_CDashUploadFTP) set(CASE_DROP_METHOD ftp) |