diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-29 19:58:33 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-02-29 19:58:33 (GMT) |
commit | 22dc873ef07bdb31ee80b6117a781b1253ae7f94 (patch) | |
tree | b95ec3c8dc92c458f3e2a4498b61e6ca59eebc99 | |
parent | b548b34a117f11f071cf29888e8270a5a398a4e9 (diff) | |
download | CMake-22dc873ef07bdb31ee80b6117a781b1253ae7f94.zip CMake-22dc873ef07bdb31ee80b6117a781b1253ae7f94.tar.gz CMake-22dc873ef07bdb31ee80b6117a781b1253ae7f94.tar.bz2 |
ENH: allow cdash not to trigger
-rw-r--r-- | Modules/DartConfiguration.tcl.in | 1 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.cxx | 69 | ||||
-rw-r--r-- | Source/CTest/cmCTestSubmitHandler.h | 1 |
3 files changed, 44 insertions, 27 deletions
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index daf8b79..3ff6a59 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -14,6 +14,7 @@ Site: @SITE@ BuildName: @BUILDNAME@ # Submission information +IsCDash: @CTEST_DROP_SITE_CDASH@ DropSite: @DROP_SITE@ DropLocation: @DROP_LOCATION@ DropSiteUser: @DROP_SITE_USER@ diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 1b60bc3..adc5bdf 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -68,11 +68,13 @@ cmCTestSubmitHandler::cmCTestSubmitHandler() : HTTPProxy(), FTPProxy() 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 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix, //---------------------------------------------------------------------------- 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 @@ int cmCTestSubmitHandler::ProcessHandler() 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 @@ int cmCTestSubmitHandler::ProcessHandler() 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; } diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 7c802c5..6aa11ca 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -77,6 +77,7 @@ private: cmStdString FTPProxy; int FTPProxyType; std::ostream* LogFile; + bool CDash; }; #endif |