diff options
author | Betsy McPhail <betsy.mcphail@kitware.com> | 2019-07-17 14:02:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-19 16:00:30 (GMT) |
commit | da79075c4de45095d8f9eca5d2cc76711b79341e (patch) | |
tree | aced62c9adeb512a0350b79a56bb306ece410ba5 | |
parent | 79bcf4e1655ffa38e8f4740b19ec3a14ac567eec (diff) | |
download | CMake-da79075c4de45095d8f9eca5d2cc76711b79341e.zip CMake-da79075c4de45095d8f9eca5d2cc76711b79341e.tar.gz CMake-da79075c4de45095d8f9eca5d2cc76711b79341e.tar.bz2 |
CTest: Generate Done.xml before calculating its hash
Fixes: #19489
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 1fa7988..54c4bae 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -266,15 +266,6 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP( } } - upload_as += "&MD5="; - - if (cmSystemTools::IsOn(this->GetOption("InternalTest"))) { - upload_as += "bad_md5sum"; - } else { - upload_as += - cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5); - } - // Generate Done.xml right before it is submitted. // The reason for this is two-fold: // 1) It must be generated after some other part has been submitted @@ -286,6 +277,15 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP( this->CTest->GenerateDoneFile(); } + upload_as += "&MD5="; + + if (cmSystemTools::IsOn(this->GetOption("InternalTest"))) { + upload_as += "bad_md5sum"; + } else { + upload_as += + cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5); + } + if (!cmSystemTools::FileExists(local_file)) { cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: " << local_file << std::endl); |