[Cmake-commits] CMake branch, next, updated. v2.8.1-1293-g81d5a94

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jun 3 13:27:32 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  81d5a940ce84df361aabca7811e4404bc53854f6 (commit)
       via  082c87e5287e75e65a75d7588c40508f12e18632 (commit)
      from  0053b7a1af5d766be8472a439b428484f830f6c8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=81d5a940ce84df361aabca7811e4404bc53854f6
commit 81d5a940ce84df361aabca7811e4404bc53854f6
Merge: 0053b7a 082c87e
Author: Zach Mullen <zach.mullen at kitware.com>
Date:   Thu Jun 3 13:27:44 2010 -0400

    Merge branch 'ctest-file-checksum' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=082c87e5287e75e65a75d7588c40508f12e18632
commit 082c87e5287e75e65a75d7588c40508f12e18632
Author: Zach Mullen <zach.mullen at kitware.com>
Date:   Thu Jun 3 13:27:26 2010 -0400

    Cross-platform fixes for checksum/retry code

diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 799ff79..cbb9a32 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -85,5 +85,5 @@ CurlOptions: @CTEST_CURL_OPTIONS@
 
 # For CTest submissions that timeout, these options
 # specify behavior for retrying the submission
-CTestRetryTime: @CTEST_SUBMIT_RETRY_DELAY@
-CTestRetryCount: @CTEST_SUBMIT_RETRY_COUNT@
+CTestSubmitRetryDelay: @CTEST_SUBMIT_RETRY_DELAY@
+CTestSubmitRetryCount: @CTEST_SUBMIT_RETRY_COUNT@
diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h
index 14dfa37..5a80b45 100644
--- a/Source/CTest/cmCTestSubmitCommand.h
+++ b/Source/CTest/cmCTestSubmitCommand.h
@@ -63,7 +63,8 @@ public:
   virtual const char* GetFullDocumentation()
     {
     return
-      "  ctest_submit([PARTS ...] [FILES ...] [RETURN_VALUE res])\n"
+      "  ctest_submit([PARTS ...] [FILES ...] [RETRY_COUNT count] "
+      "               [RETRY_DELAY delay][RETURN_VALUE res])\n"
       "By default all available parts are submitted if no PARTS or FILES "
       "are specified.  "
       "The PARTS option lists a subset of parts to be submitted.  "
@@ -79,7 +80,11 @@ public:
       "  ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES\n"
       "  Submit     = nothing\n"
       "The FILES option explicitly lists specific files to be submitted.  "
-      "Each individual file must exist at the time of the call.\n";
+      "Each individual file must exist at the time of the call.\n"
+      "The RETRY_DELAY option specifies how long in seconds to wait after "
+      "a timed-out submission before attempting to re-submit.\n"
+      "The RETRY_COUNT option specifies how many times to retry a timed-out "
+      "submission.\n";
     }
 
   cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index fca05ac..fe00a82 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -55,12 +55,19 @@ public:
   std::string Message;
 
 private:
-  std::string CurrentValue;
-  std::string CurrentTag;
+
+  std::vector<char> CurrentValue;
+
+  std::string GetCurrentValue()
+    {
+    std::string val;
+    val.assign(&this->CurrentValue[0], this->CurrentValue.size());
+    return val;
+    }
 
   virtual void StartElement(const char* name, const char** atts)
     {
-    this->CurrentValue = "";
+    this->CurrentValue.clear();
     if(strcmp(name, "cdash") == 0)
       {
       this->CDashVersion = this->FindAttribute(atts, "version");
@@ -76,12 +83,12 @@ private:
     {
     if(strcmp(name, "status") == 0)
       {
-      this->CurrentValue = cmSystemTools::UpperCase(this->CurrentValue);
-      if(this->CurrentValue == "OK" || this->CurrentValue == "SUCCESS")
+      std::string status = cmSystemTools::UpperCase(this->GetCurrentValue());
+      if(status == "OK" || status == "SUCCESS")
         {
         this->Status = STATUS_OK;
         }
-      else if(this->CurrentValue == "WARNING")
+      else if(status == "WARNING")
         {
         this->Status = STATUS_WARNING;
         }
@@ -92,15 +99,15 @@ private:
       }
     else if(strcmp(name, "filename") == 0)
       {
-      this->Filename = this->CurrentValue;
+      this->Filename = this->GetCurrentValue();
       }
     else if(strcmp(name, "md5") == 0)
       {
-      this->MD5 = this->CurrentValue;
+      this->MD5 = this->GetCurrentValue();
       }
     else if(strcmp(name, "message") == 0)
       {
-      this->Message = this->CurrentValue;
+      this->Message = this->GetCurrentValue();
       }
     }
 };
@@ -445,9 +452,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
       char md5[33];
       cmSystemTools::ComputeFileMD5(local_file.c_str(), md5);
       md5[32] = 0;
-      std::stringstream md5string;
-      md5string << "&MD5=" << md5;
-      upload_as += md5string.str();
+      upload_as += "&MD5=";
+      upload_as += md5;
 
       struct stat st;
       if ( ::stat(local_file.c_str(), &st) )
@@ -501,9 +507,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
           "" : this->GetOption("RetryCount");
 
         int time = retryTime == "" ? atoi(this->CTest->GetCTestConfiguration(
-          "CTestRetryTime").c_str()) : atoi(retryTime.c_str());
+          "CTestSubmitRetryDelay").c_str()) : atoi(retryTime.c_str());
         int count = retryCount == "" ? atoi(this->CTest->GetCTestConfiguration(
-          "CTestRetryCount").c_str()) : atoi(retryCount.c_str());
+          "CTestSubmitRetryCount").c_str()) : atoi(retryCount.c_str());
 
         for(int i = 0; i < count; i++)
           {

-----------------------------------------------------------------------

Summary of changes:
 Modules/DartConfiguration.tcl.in      |    4 +-
 Source/CTest/cmCTestSubmitCommand.h   |    9 ++++++-
 Source/CTest/cmCTestSubmitHandler.cxx |   34 +++++++++++++++++++-------------
 3 files changed, 29 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list