Commit 22dc873e authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: allow cdash not to trigger

parent b548b34a
...@@ -14,6 +14,7 @@ Site: @SITE@ ...@@ -14,6 +14,7 @@ Site: @SITE@
BuildName: @BUILDNAME@ BuildName: @BUILDNAME@
# Submission information # Submission information
IsCDash: @CTEST_DROP_SITE_CDASH@
DropSite: @DROP_SITE@ DropSite: @DROP_SITE@
DropLocation: @DROP_LOCATION@ DropLocation: @DROP_LOCATION@
DropSiteUser: @DROP_SITE_USER@ DropSiteUser: @DROP_SITE_USER@
......
...@@ -68,11 +68,13 @@ cmCTestSubmitHandler::cmCTestSubmitHandler() : HTTPProxy(), FTPProxy() ...@@ -68,11 +68,13 @@ cmCTestSubmitHandler::cmCTestSubmitHandler() : HTTPProxy(), FTPProxy()
this->FTPProxy = ""; this->FTPProxy = "";
this->FTPProxyType = 0; this->FTPProxyType = 0;
this->CDash = false;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmCTestSubmitHandler::Initialize() void cmCTestSubmitHandler::Initialize()
{ {
this->CDash = false;
this->Superclass::Initialize(); this->Superclass::Initialize();
this->HTTPProxy = ""; this->HTTPProxy = "";
this->HTTPProxyType = 0; this->HTTPProxyType = 0;
...@@ -755,6 +757,13 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix, ...@@ -755,6 +757,13 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int cmCTestSubmitHandler::ProcessHandler() 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 const std::string &buildDirectory
= this->CTest->GetCTestConfiguration("BuildDirectory"); = this->CTest->GetCTestConfiguration("BuildDirectory");
if ( buildDirectory.size() == 0 ) if ( buildDirectory.size() == 0 )
...@@ -947,23 +956,26 @@ int cmCTestSubmitHandler::ProcessHandler() ...@@ -947,23 +956,26 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Problems when submitting via FTP" << std::endl; ofs << " Problems when submitting via FTP" << std::endl;
return -1; return -1;
} }
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method" if(!this->CDash)
<< std::endl
<< " Trigger site: "
<< this->CTest->GetCTestConfiguration("TriggerSite")
<< std::endl);
if ( !this->TriggerUsingHTTP(files, prefix,
this->CTest->GetCTestConfiguration("TriggerSite")) )
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
" Problems when triggering via HTTP" << std::endl); << std::endl
ofs << " Problems when triggering via HTTP" << std::endl; << " Trigger site: "
return -1; << 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" ) else if ( this->CTest->GetCTestConfiguration("DropMethod") == "http" )
{ {
...@@ -998,21 +1010,24 @@ int cmCTestSubmitHandler::ProcessHandler() ...@@ -998,21 +1010,24 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Problems when submitting via HTTP" << std::endl; ofs << " Problems when submitting via HTTP" << std::endl;
return -1; return -1;
} }
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method" if(!this->CDash)
<< std::endl
<< " Trigger site: "
<< this->CTest->GetCTestConfiguration("TriggerSite")
<< std::endl);
if ( !this->TriggerUsingHTTP(files, prefix,
this->CTest->GetCTestConfiguration("TriggerSite")) )
{ {
cmCTestLog(this->CTest, ERROR_MESSAGE, cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
" Problems when triggering via HTTP" << std::endl); << std::endl
ofs << " Problems when triggering via HTTP" << std::endl; << " Trigger site: "
return -1; << 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" cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful"
<< std::endl); << std::endl);
ofs << " Submission successful" << std::endl; ofs << " Submission successful" << std::endl;
return 0; return 0;
} }
......
...@@ -77,6 +77,7 @@ private: ...@@ -77,6 +77,7 @@ private:
cmStdString FTPProxy; cmStdString FTPProxy;
int FTPProxyType; int FTPProxyType;
std::ostream* LogFile; std::ostream* LogFile;
bool CDash;
}; };
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment