[cmake-commits] hoffman committed cmCTestSubmitHandler.cxx 1.29 1.30 cmCTestSubmitHandler.h 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Feb 29 14:58:35 EST 2008


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv3077/Source/CTest

Modified Files:
	cmCTestSubmitHandler.cxx cmCTestSubmitHandler.h 
Log Message:
ENH: allow cdash not to trigger


Index: cmCTestSubmitHandler.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestSubmitHandler.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cmCTestSubmitHandler.h	10 Mar 2006 20:03:09 -0000	1.4
+++ cmCTestSubmitHandler.h	29 Feb 2008 19:58:33 -0000	1.5
@@ -77,6 +77,7 @@
   cmStdString   FTPProxy;
   int           FTPProxyType;
   std::ostream* LogFile;
+  bool CDash;
 };
 
 #endif

Index: cmCTestSubmitHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestSubmitHandler.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- cmCTestSubmitHandler.cxx	7 Nov 2007 14:12:34 -0000	1.29
+++ cmCTestSubmitHandler.cxx	29 Feb 2008 19:58:33 -0000	1.30
@@ -68,11 +68,13 @@
 
   this->FTPProxy = "";
   this->FTPProxyType = 0;
+  this->CDash = false;
 }
 
 //----------------------------------------------------------------------------
 void cmCTestSubmitHandler::Initialize()
 {
+  this->CDash = false;
   this->Superclass::Initialize();
   this->HTTPProxy = "";
   this->HTTPProxyType = 0;
@@ -755,6 +757,13 @@
 //----------------------------------------------------------------------------
 int cmCTestSubmitHandler::ProcessHandler()
 {
+  std::string iscdash = this->CTest->GetCTestConfiguration("IsCDash");
+  // cdash does not need to trigger so just return true
+  if(iscdash.size())
+    {
+    this->CDash = true;
+    }
+
   const std::string &buildDirectory
     = this->CTest->GetCTestConfiguration("BuildDirectory");
   if ( buildDirectory.size() == 0 )
@@ -947,23 +956,26 @@
       ofs << "   Problems when submitting via FTP" << std::endl;
       return -1;
       }
-    cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Using HTTP trigger method"
-      << std::endl
-      << "   Trigger site: "
-      << this->CTest->GetCTestConfiguration("TriggerSite")
-      << std::endl);
-    if ( !this->TriggerUsingHTTP(files, prefix,
-        this->CTest->GetCTestConfiguration("TriggerSite")) )
+    if(!this->CDash)
       {
-      cmCTestLog(this->CTest, ERROR_MESSAGE,
-        "   Problems when triggering via HTTP" << std::endl);
-      ofs << "   Problems when triggering via HTTP" << std::endl;
-      return -1;
+      cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Using HTTP trigger method"
+                 << std::endl
+                 << "   Trigger site: "
+                 << this->CTest->GetCTestConfiguration("TriggerSite")
+                 << std::endl);
+      if ( !this->TriggerUsingHTTP(files, prefix,
+                                   this->CTest->GetCTestConfiguration("TriggerSite")) )
+        {
+        cmCTestLog(this->CTest, ERROR_MESSAGE,
+                   "   Problems when triggering via HTTP" << std::endl);
+        ofs << "   Problems when triggering via HTTP" << std::endl;
+        return -1;
+        }
+      cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Submission successful"
+                 << std::endl);
+      ofs << "   Submission successful" << std::endl;
+      return 0;
       }
-    cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Submission successful"
-      << std::endl);
-    ofs << "   Submission successful" << std::endl;
-    return 0;
     }
   else if ( this->CTest->GetCTestConfiguration("DropMethod") == "http" )
     {
@@ -998,21 +1010,24 @@
       ofs << "   Problems when submitting via HTTP" << std::endl;
       return -1;
       }
-    cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Using HTTP trigger method"
-      << std::endl
-      << "   Trigger site: "
-      << this->CTest->GetCTestConfiguration("TriggerSite")
-      << std::endl);
-    if ( !this->TriggerUsingHTTP(files, prefix,
-        this->CTest->GetCTestConfiguration("TriggerSite")) )
+    if(!this->CDash)
       {
-      cmCTestLog(this->CTest, ERROR_MESSAGE,
-        "   Problems when triggering via HTTP" << std::endl);
-      ofs << "   Problems when triggering via HTTP" << std::endl;
-      return -1;
+      cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Using HTTP trigger method"
+                 << std::endl
+                 << "   Trigger site: "
+                 << this->CTest->GetCTestConfiguration("TriggerSite")
+                 << std::endl);
+      if ( !this->TriggerUsingHTTP(files, prefix,
+                                   this->CTest->GetCTestConfiguration("TriggerSite")) )
+        {
+        cmCTestLog(this->CTest, ERROR_MESSAGE,
+                   "   Problems when triggering via HTTP" << std::endl);
+        ofs << "   Problems when triggering via HTTP" << std::endl;
+        return -1;
+        }
       }
     cmCTestLog(this->CTest, HANDLER_OUTPUT, "   Submission successful"
-      << std::endl);
+               << std::endl);
     ofs << "   Submission successful" << std::endl;
     return 0;
     }



More information about the Cmake-commits mailing list