diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2017-01-04 15:27:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-01-20 16:37:27 (GMT) |
commit | 5614a5cd1f7f8fe34f6b31c572476a2ddfd6d9ae (patch) | |
tree | fde1befc0e3198dc331b15ea861842c36c97f7df /Source/CTest/cmCTestCurl.cxx | |
parent | c628fd2fab273999e959aad00834369924dd9d06 (diff) | |
download | CMake-5614a5cd1f7f8fe34f6b31c572476a2ddfd6d9ae.zip CMake-5614a5cd1f7f8fe34f6b31c572476a2ddfd6d9ae.tar.gz CMake-5614a5cd1f7f8fe34f6b31c572476a2ddfd6d9ae.tar.bz2 |
ctest_submit: Allow RETRY_COUNT for CDASH_UPLOAD
Teach the CDASH_UPLOAD signature of ctest_submit() to honor the
RETRY_COUNT and RETRY_DELAY options.
Also teach HttpRequest() to honor the default 120 second timeout
for curl connections.
Diffstat (limited to 'Source/CTest/cmCTestCurl.cxx')
-rw-r--r-- | Source/CTest/cmCTestCurl.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index 9a90f54..0fb4239 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -96,6 +96,13 @@ bool cmCTestCurl::InitCurl() } // enable HTTP ERROR parsing curl_easy_setopt(this->Curl, CURLOPT_FAILONERROR, 1); + + // if there is little to no activity for too long stop submitting + if (this->TimeOutSeconds) { + curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_LIMIT, 1); + curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_TIME, this->TimeOutSeconds); + } + return true; } @@ -110,12 +117,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, } /* enable uploading */ curl_easy_setopt(this->Curl, CURLOPT_UPLOAD, 1); - // if there is little to no activity for too long stop submitting - if (this->TimeOutSeconds) { - ::curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_LIMIT, 1); - ::curl_easy_setopt(this->Curl, CURLOPT_LOW_SPEED_TIME, - this->TimeOutSeconds); - } + /* HTTP PUT please */ ::curl_easy_setopt(this->Curl, CURLOPT_PUT, 1); ::curl_easy_setopt(this->Curl, CURLOPT_VERBOSE, 1); |