diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2010-06-05 14:36:23 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2010-06-05 14:36:23 (GMT) |
commit | 86e81b53c196bfd29aa7d877d2fb9e71a6392cc1 (patch) | |
tree | 57bd322f3206f27f5d2e30f11d3794b7a279263d /Source/CTest/cmCTestSubmitHandler.cxx | |
parent | d6b71078da1bf75ab3031bae5c2952a6f0bd9d45 (diff) | |
download | CMake-86e81b53c196bfd29aa7d877d2fb9e71a6392cc1.zip CMake-86e81b53c196bfd29aa7d877d2fb9e71a6392cc1.tar.gz CMake-86e81b53c196bfd29aa7d877d2fb9e71a6392cc1.tar.bz2 |
CTest should resubmit in the checksum failed case
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 9bbb2e6..21c005d 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -501,8 +501,22 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, // Now run off and do what you've been told! res = ::curl_easy_perform(curl); - // If we time out or operation is too slow, wait and retry - if(res == CURLE_OPERATION_TIMEOUTED) + if ( chunk.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + this->ParseResponse(chunk); + } + if ( chunkDebug.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL debug output: [" + << cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]" + << std::endl); + } + + // If we time out or checksum fails, wait and retry + if(res == CURLE_OPERATION_TIMEDOUT || this->HasErrors) { std::string retryTime = this->GetOption("RetryTime") == NULL ? "" : this->GetOption("RetryTime"); @@ -532,30 +546,25 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, chunk.clear(); chunkDebug.clear(); + this->HasErrors = false; res = ::curl_easy_perform(curl); - if(res != CURLE_OPERATION_TIMEDOUT) + if ( chunk.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + this->ParseResponse(chunk); + } + + if(res != CURLE_OPERATION_TIMEDOUT && !this->HasErrors) { break; } } } - if ( chunk.size() > 0 ) - { - cmCTestLog(this->CTest, DEBUG, "CURL output: [" - << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" - << std::endl); - this->ParseResponse(chunk); - } - if ( chunkDebug.size() > 0 ) - { - cmCTestLog(this->CTest, DEBUG, "CURL debug output: [" - << cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]" - << std::endl); - } - fclose(ftpfile); if ( res ) { |