summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/ctest.1.rst5
-rw-r--r--Help/variable/CTEST_TRIGGER_SITE.rst3
-rw-r--r--Modules/DartConfiguration.tcl.in1
-rw-r--r--Source/CTest/cmCTestSubmitCommand.cxx9
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx153
-rw-r--r--Source/CTest/cmCTestSubmitHandler.h5
6 files changed, 3 insertions, 173 deletions
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 3999feb..064a6da 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1137,7 +1137,7 @@ Configuration settings include:
``IsCDash``
Specify whether the dashboard server is `CDash`_ or an older
- dashboard server implementation requiring ``TriggerSite``.
+ dashboard server implementation.
* `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_CDASH`
* :module:`CTest` module variable: ``CTEST_DROP_SITE_CDASH``
@@ -1157,8 +1157,7 @@ Configuration settings include:
initialized by the :command:`site_name` command
``TriggerSite``
- Legacy option to support older dashboard server implementations.
- Not used when ``IsCDash`` is true.
+ Legacy option. Not used.
* `CTest Script`_ variable: :variable:`CTEST_TRIGGER_SITE`
* :module:`CTest` module variable: ``TRIGGER_SITE`` if set,
diff --git a/Help/variable/CTEST_TRIGGER_SITE.rst b/Help/variable/CTEST_TRIGGER_SITE.rst
index de92428..a50e405 100644
--- a/Help/variable/CTEST_TRIGGER_SITE.rst
+++ b/Help/variable/CTEST_TRIGGER_SITE.rst
@@ -1,5 +1,4 @@
CTEST_TRIGGER_SITE
------------------
-Specify the CTest ``TriggerSite`` setting
-in a :manual:`ctest(1)` dashboard client script.
+Legacy option. Not used.
diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in
index 735cadd..8cf2f4d 100644
--- a/Modules/DartConfiguration.tcl.in
+++ b/Modules/DartConfiguration.tcl.in
@@ -29,7 +29,6 @@ DropSiteUser: @DROP_SITE_USER@
DropSitePassword: @DROP_SITE_PASSWORD@
DropSiteMode: @DROP_SITE_MODE@
DropMethod: @DROP_METHOD@
-TriggerSite: @TRIGGER_SITE@
# Dashboard start time
NightlyStartTime: @NIGHTLY_START_TIME@
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index c1705d7..2165f40 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -20,8 +20,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
const char* ctestDropSite = this->Makefile->GetDefinition("CTEST_DROP_SITE");
const char* ctestDropLocation =
this->Makefile->GetDefinition("CTEST_DROP_LOCATION");
- const char* ctestTriggerSite =
- this->Makefile->GetDefinition("CTEST_TRIGGER_SITE");
bool ctestDropSiteCDash = this->Makefile->IsOn("CTEST_DROP_SITE_CDASH");
if (!ctestDropMethod) {
ctestDropMethod = "http";
@@ -44,13 +42,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->CTest->SetCTestConfiguration(
"IsCDash", ctestDropSiteCDash ? "TRUE" : "FALSE", this->Quiet);
- // Only propagate TriggerSite for non-CDash projects:
- //
- if (!ctestDropSiteCDash) {
- this->CTest->SetCTestConfiguration("TriggerSite", ctestTriggerSite,
- this->Quiet);
- }
-
this->CTest->SetCTestConfigurationFromCMakeVariable(
this->Makefile, "CurlOptions", "CTEST_CURL_OPTIONS", this->Quiet);
this->CTest->SetCTestConfigurationFromCMakeVariable(
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 509d767..75e2cd5 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -131,7 +131,6 @@ void cmCTestSubmitHandler::Initialize()
p = cmCTest::Part(p + 1)) {
this->SubmitPart[p] = true;
}
- this->CDash = false;
this->HasWarnings = false;
this->HasErrors = false;
this->Superclass::Initialize();
@@ -516,136 +515,6 @@ void cmCTestSubmitHandler::ParseResponse(
}
}
-bool cmCTestSubmitHandler::TriggerUsingHTTP(
- const std::vector<std::string>& files, const std::string& remoteprefix,
- const std::string& url)
-{
- CURL* curl;
- char error_buffer[1024];
-
- /* In windows, this will init the winsock stuff */
- ::curl_global_init(CURL_GLOBAL_ALL);
-
- for (std::string const& file : files) {
- /* get a curl handle */
- curl = curl_easy_init();
- if (curl) {
- // Using proxy
- if (this->HTTPProxyType > 0) {
- curl_easy_setopt(curl, CURLOPT_PROXY, this->HTTPProxy.c_str());
- switch (this->HTTPProxyType) {
- case 2:
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
- break;
- case 3:
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
- break;
- default:
- curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
- if (!this->HTTPProxyAuth.empty()) {
- curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD,
- this->HTTPProxyAuth.c_str());
- }
- }
- }
-
- ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-
- // and give curl the buffer for errors
- ::curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &error_buffer);
-
- // specify handler for output
- ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
- cmCTestSubmitHandlerWriteMemoryCallback);
- ::curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION,
- cmCTestSubmitHandlerCurlDebugCallback);
-
- /* we pass our 'chunk' struct to the callback function */
- cmCTestSubmitHandlerVectorOfChar chunk;
- cmCTestSubmitHandlerVectorOfChar chunkDebug;
- ::curl_easy_setopt(curl, CURLOPT_FILE, &chunk);
- ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &chunkDebug);
-
- std::string rfile = remoteprefix + cmSystemTools::GetFilenameName(file);
- std::string ofile;
- for (char c : rfile) {
- char hexCh[4] = { 0, 0, 0, 0 };
- hexCh[0] = c;
- switch (c) {
- case '+':
- case '?':
- case '/':
- case '\\':
- case '&':
- case ' ':
- case '=':
- case '%':
- sprintf(hexCh, "%%%02X", static_cast<int>(c));
- ofile.append(hexCh);
- break;
- default:
- ofile.append(hexCh);
- }
- }
- std::string turl = url +
- ((url.find('?') == std::string::npos) ? '?' : '&') +
- "xmlfile=" + ofile;
- *this->LogFile << "Trigger url: " << turl << std::endl;
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- " Trigger url: " << turl << std::endl, this->Quiet);
- curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
- curl_easy_setopt(curl, CURLOPT_URL, turl.c_str());
- if (curl_easy_perform(curl)) {
- cmCTestLog(this->CTest, ERROR_MESSAGE,
- " Error when triggering: " << turl << std::endl);
- cmCTestLog(this->CTest, ERROR_MESSAGE,
- " Error message was: " << error_buffer << std::endl);
- *this->LogFile << "\tTriggering failed with error: " << error_buffer
- << std::endl
- << " Error message was: " << error_buffer
- << std::endl;
- if (!chunk.empty()) {
- *this->LogFile << " Curl output was: "
- << cmCTestLogWrite(&*chunk.begin(), chunk.size())
- << std::endl;
- cmCTestLog(this->CTest, ERROR_MESSAGE,
- "CURL output: ["
- << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
- << std::endl);
- }
- ::curl_easy_cleanup(curl);
- ::curl_global_cleanup();
- return false;
- }
-
- if (!chunk.empty()) {
- cmCTestOptionalLog(this->CTest, DEBUG,
- "CURL output: ["
- << cmCTestLogWrite(&*chunk.begin(), chunk.size())
- << "]" << std::endl,
- this->Quiet);
- }
- if (!chunkDebug.empty()) {
- cmCTestOptionalLog(
- this->CTest, DEBUG,
- "CURL debug output: ["
- << cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
- << std::endl,
- this->Quiet);
- }
-
- // always cleanup
- ::curl_easy_cleanup(curl);
- cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl,
- this->Quiet);
- }
- }
- ::curl_global_cleanup();
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
- " Dart server triggered..." << std::endl, this->Quiet);
- return true;
-}
-
void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
std::string& url)
{
@@ -900,11 +769,6 @@ int cmCTestSubmitHandler::ProcessHandler()
if (cdashUploadFile && cdashUploadType) {
return this->HandleCDashUploadFile(cdashUploadFile, cdashUploadType);
}
- std::string iscdash = this->CTest->GetCTestConfiguration("IsCDash");
- // cdash does not need to trigger so just return true
- if (!iscdash.empty()) {
- this->CDash = true;
- }
const std::string& buildDirectory =
this->CTest->GetCTestConfiguration("BuildDirectory");
@@ -1084,23 +948,6 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Problems when submitting via HTTP" << std::endl;
return -1;
}
- if (!this->CDash) {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
- " Using HTTP trigger method"
- << std::endl
- << " Trigger site: "
- << this->CTest->GetCTestConfiguration("TriggerSite")
- << std::endl,
- this->Quiet);
- 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;
- }
- }
if (this->HasErrors) {
cmCTestLog(this->CTest, HANDLER_OUTPUT,
" Errors occurred during "
diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h
index 15f230b..393e826 100644
--- a/Source/CTest/cmCTestSubmitHandler.h
+++ b/Source/CTest/cmCTestSubmitHandler.h
@@ -61,10 +61,6 @@ private:
const std::string& remoteprefix,
const std::string& url);
- bool TriggerUsingHTTP(const std::vector<std::string>& files,
- const std::string& remoteprefix,
- const std::string& url);
-
typedef std::vector<char> cmCTestSubmitHandlerVectorOfChar;
void ParseResponse(cmCTestSubmitHandlerVectorOfChar chunk);
@@ -78,7 +74,6 @@ private:
std::string HTTPProxyAuth;
std::ostream* LogFile;
bool SubmitPart[cmCTest::PartCount];
- bool CDash;
bool HasWarnings;
bool HasErrors;
cmCTest::SetOfStrings Files;