From c2f6872c4e98a24a24675fa3f9fe016230eeb878 Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Tue, 27 Nov 2018 20:39:48 +0100 Subject: CTest: Remove submit method 'xmlrpc' --- CMakeLists.txt | 26 +--- Help/manual/ctest.1.rst | 5 +- Source/CMakeLists.txt | 3 +- Source/CTest/cmCTestSubmitHandler.cxx | 137 --------------------- Source/CTest/cmCTestSubmitHandler.h | 5 - Source/cmCurl.cxx | 2 - .../ctest_submit/FailDrop-xmlrpc-result.txt | 1 - .../ctest_submit/FailDrop-xmlrpc-stderr.txt | 1 - .../ctest_submit/FailDrop-xmlrpc-stdout.txt | 1 - Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 1 - Utilities/IWYU/mapping.imp | 3 - Utilities/cmThirdParty.h.in | 1 - Utilities/cm_xmlrpc.h | 13 -- 13 files changed, 7 insertions(+), 192 deletions(-) delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-result.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt delete mode 100644 Utilities/cm_xmlrpc.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 756e379..699fd4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,10 +137,6 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) # Options have dependencies. include(CMakeDependentOption) - # Optionally use system xmlrpc. We no longer build or use it by default. - option(CTEST_USE_XMLRPC "Enable xmlrpc submission method in CTest." OFF) - mark_as_advanced(CTEST_USE_XMLRPC) - # Allow the user to enable/disable all system utility library options by # defining CMAKE_USE_SYSTEM_LIBRARIES or CMAKE_USE_SYSTEM_LIBRARY_${util}. set(UTILITIES BZIP2 CURL EXPAT FORM JSONCPP LIBARCHIVE LIBLZMA LIBRHASH LIBUV ZLIB) @@ -171,10 +167,8 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) # Optionally use system utility libraries. option(CMAKE_USE_SYSTEM_LIBARCHIVE "Use system-installed libarchive" "${CMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE}") - CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl" - "${CMAKE_USE_SYSTEM_LIBRARY_CURL}" "NOT CTEST_USE_XMLRPC" ON) - CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat" - "${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}" "NOT CTEST_USE_XMLRPC" ON) + option(CMAKE_USE_SYSTEM_CURL "Use system-installed curl" "${CMAKE_USE_SYSTEM_LIBRARY_CURL}") + option(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat" "${CMAKE_USE_SYSTEM_LIBRARY_EXPAT}") CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib" "${CMAKE_USE_SYSTEM_LIBRARY_ZLIB}" "NOT CMAKE_USE_SYSTEM_LIBARCHIVE;NOT CMAKE_USE_SYSTEM_CURL" ON) CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2" @@ -212,7 +206,7 @@ endmacro() macro(CMAKE_SETUP_TESTING) if(BUILD_TESTING) set(CMAKE_TEST_SYSTEM_LIBRARIES 0) - foreach(util CURL EXPAT XMLRPC ZLIB) + foreach(util CURL EXPAT ZLIB) if(CMAKE_USE_SYSTEM_${util}) set(CMAKE_TEST_SYSTEM_LIBRARIES 1) endif() @@ -572,18 +566,6 @@ macro (CMAKE_BUILD_UTILITIES) endif() #--------------------------------------------------------------------- - # Build XMLRPC library for CMake and CTest. - if(CTEST_USE_XMLRPC) - find_package(XMLRPC QUIET REQUIRED libwww-client) - if(NOT XMLRPC_FOUND) - message(FATAL_ERROR - "CTEST_USE_XMLRPC is ON but xmlrpc is not found!") - endif() - set(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS}) - set(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES}) - endif() - - #--------------------------------------------------------------------- # Use curses? if (UNIX) if(NOT DEFINED BUILD_CursesDialog) @@ -736,7 +718,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) # the build tree, which is both the build and the install RPATH. if (UNIX) if( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB - OR CMAKE_USE_SYSTEM_EXPAT OR CTEST_USE_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH) + OR CMAKE_USE_SYSTEM_EXPAT OR CURSES_NEED_RPATH OR QT_NEED_RPATH) set(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 9e0ce27..82be6e3 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1107,8 +1107,7 @@ Configuration settings include: ``DropMethod`` Specify the method by which results should be submitted to the dashboard server. The value may be ``cp``, ``ftp``, ``http``, - ``https``, ``scp``, or ``xmlrpc`` (if CMake was built with - support for it). + ``https``, or ``scp``. * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD` * :module:`CTest` module variable: ``DROP_METHOD`` if set, @@ -1116,7 +1115,7 @@ Configuration settings include: ``DropSite`` The dashboard server name - (for ``ftp``, ``http``, and ``https``, ``scp``, and ``xmlrpc``). + (for ``ftp``, ``http``, and ``https``, ``scp``). * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE` * :module:`CTest` module variable: ``DROP_SITE`` if set, diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 9aebfa7..464d6f3 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -813,7 +813,6 @@ target_compile_definitions(CMakeLib PUBLIC ${CLANG_TIDY_DEFINITIONS}) # include_directories( "${CMake_SOURCE_DIR}/Source/CTest" - ${CMAKE_XMLRPC_INCLUDES} ${CMAKE_CURL_INCLUDES} ) # @@ -879,7 +878,7 @@ set(CTEST_SRCS cmCTest.cxx # Build CTestLib add_library(CTestLib ${CTEST_SRCS}) -target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES}) +target_link_libraries(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES}) # # CPack diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 061c8ef..8323381 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -23,17 +23,10 @@ #include "cmProcessOutput.h" #include "cmState.h" #include "cmSystemTools.h" -#include "cmThirdParty.h" #include "cmWorkingDirectory.h" #include "cmXMLParser.h" #include "cmake.h" -#if defined(CTEST_USE_XMLRPC) -# include "cmVersion.h" -# include "cm_sys_stat.h" -# include "cm_xmlrpc.h" -#endif - #define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120 typedef std::vector cmCTestSubmitHandlerVectorOfChar; @@ -936,110 +929,6 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix, return true; } -#if defined(CTEST_USE_XMLRPC) -bool cmCTestSubmitHandler::SubmitUsingXMLRPC( - const std::string& localprefix, const std::vector& files, - const std::string& remoteprefix, const std::string& url) -{ - xmlrpc_env env; - char ctestString[] = "CTest"; - std::string ctestVersionString = cmVersion::GetCMakeVersion(); - char* ctestVersion = const_cast(ctestVersionString.c_str()); - - std::string realURL = url + "/" + remoteprefix + "/Command/"; - - /* Start up our XML-RPC client library. */ - xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, ctestString, ctestVersion); - - /* Initialize our error-handling environment. */ - xmlrpc_env_init(&env); - - /* Call the famous server at UserLand. */ - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Submitting to: " << realURL << " (" << remoteprefix - << ")" << std::endl, - this->Quiet); - for (std::string const& file : files) { - xmlrpc_value* result; - - std::string local_file = file; - if (!cmSystemTools::FileExists(local_file)) { - local_file = localprefix + "/" + file; - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Submit file: " << local_file << std::endl, - this->Quiet); - struct stat st; - if (::stat(local_file.c_str(), &st)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Cannot find file: " << local_file << std::endl); - return false; - } - - // off_t can be bigger than size_t. fread takes size_t. - // make sure the file is not too big. - if (static_cast(static_cast(st.st_size)) != - static_cast(st.st_size)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " File too big: " << local_file << std::endl); - return false; - } - size_t fileSize = static_cast(st.st_size); - FILE* fp = cmsys::SystemTools::Fopen(local_file, "rb"); - if (!fp) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Cannot open file: " << local_file << std::endl); - return false; - } - - unsigned char* fileBuffer = new unsigned char[fileSize]; - if (fread(fileBuffer, 1, fileSize, fp) != fileSize) { - delete[] fileBuffer; - fclose(fp); - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Cannot read file: " << local_file << std::endl); - return false; - } - fclose(fp); - - char remoteCommand[] = "Submit.put"; - char* pRealURL = const_cast(realURL.c_str()); - result = - xmlrpc_client_call(&env, pRealURL, remoteCommand, "(6)", fileBuffer, - static_cast(fileSize)); - - delete[] fileBuffer; - - if (env.fault_occurred) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Submission problem: " << env.fault_string << " (" - << env.fault_code << ")" - << std::endl); - xmlrpc_env_clean(&env); - xmlrpc_client_cleanup(); - return false; - } - - /* Dispose of our result value. */ - xmlrpc_DECREF(result); - } - - /* Clean up our error-handling environment. */ - xmlrpc_env_clean(&env); - - /* Shutdown our XML-RPC client library. */ - xmlrpc_client_cleanup(); - return true; -} -#else -bool cmCTestSubmitHandler::SubmitUsingXMLRPC( - std::string const& /*unused*/, std::vector const& /*unused*/, - std::string const& /*unused*/, std::string const& /*unused*/) -{ - return false; -} -#endif - void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod, std::string& url) { @@ -1592,32 +1481,6 @@ int cmCTestSubmitHandler::ProcessHandler() } return 0; - } else if (dropMethod == "xmlrpc") { -#if defined(CTEST_USE_XMLRPC) - ofs << "Using drop method: XML-RPC" << std::endl; - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Using XML-RPC submit method" << std::endl, - this->Quiet); - std::string url = this->CTest->GetCTestConfiguration("DropSite"); - prefix = this->CTest->GetCTestConfiguration("DropLocation"); - if (!this->SubmitUsingXMLRPC(buildDirectory + "/Testing/" + - this->CTest->GetCurrentTag(), - files, prefix, url)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Problems when submitting via XML-RPC" << std::endl); - ofs << " Problems when submitting via XML-RPC" << std::endl; - return -1; - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Submission successful" << std::endl, this->Quiet); - ofs << " Submission successful" << std::endl; - return 0; -#else - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Submission method \"xmlrpc\" not compiled into CTest!" - << std::endl); - return -1; -#endif } else if (dropMethod == "scp") { std::string url; if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) { diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 66f2173..0f33735 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -76,11 +76,6 @@ private: const std::string& remoteprefix, const std::string& url); - bool SubmitUsingXMLRPC(const std::string& localprefix, - const std::vector& files, - const std::string& remoteprefix, - const std::string& url); - typedef std::vector cmCTestSubmitHandlerVectorOfChar; void ParseResponse(cmCTestSubmitHandlerVectorOfChar chunk); diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index 3360323..0482898 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -2,8 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCurl.h" -#include "cmThirdParty.h" - #if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \ !defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH) # define CMAKE_FIND_CAFILE diff --git a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt deleted file mode 100644 index c0f718e..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt +++ /dev/null @@ -1 +0,0 @@ - (Problems when submitting via XML-RPC|Submission method "xmlrpc" not compiled into CTest!) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt deleted file mode 100644 index ed2acb5..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Submit files \(using xmlrpc\) diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index 178f0cb..fc24f64 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -54,4 +54,3 @@ run_ctest_submit_FailDrop(ftp) run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) run_ctest_submit_FailDrop(scp) -run_ctest_submit_FailDrop(xmlrpc) diff --git a/Utilities/IWYU/mapping.imp b/Utilities/IWYU/mapping.imp index 5af8b85..a68d767 100644 --- a/Utilities/IWYU/mapping.imp +++ b/Utilities/IWYU/mapping.imp @@ -97,9 +97,6 @@ { include: [ "@", private, "\"cm_uv.h\"", public ] }, { include: [ "", private, "\"cm_kwiml.h\"", public ] }, { include: [ "", private, "\"cm_kwiml.h\"", public ] }, - { include: [ "", private, "\"cm_xmlrpc.h\"", public ] }, - { include: [ "", private, "\"cm_xmlrpc.h\"", public ] }, - { include: [ "@", private, "\"cm_xmlrpc.h\"", public ] }, { include: [ "", private, "\"cm_zlib.h\"", public ] }, { include: [ "", private, "\"cm_zlib.h\"", public ] }, diff --git a/Utilities/cmThirdParty.h.in b/Utilities/cmThirdParty.h.in index a547f0d..46e0490 100644 --- a/Utilities/cmThirdParty.h.in +++ b/Utilities/cmThirdParty.h.in @@ -15,6 +15,5 @@ #cmakedefine CMAKE_USE_SYSTEM_JSONCPP #cmakedefine CMAKE_USE_SYSTEM_LIBRHASH #cmakedefine CMAKE_USE_SYSTEM_LIBUV -#cmakedefine CTEST_USE_XMLRPC #endif diff --git a/Utilities/cm_xmlrpc.h b/Utilities/cm_xmlrpc.h deleted file mode 100644 index 932066a..0000000 --- a/Utilities/cm_xmlrpc.h +++ /dev/null @@ -1,13 +0,0 @@ -/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying - file Copyright.txt or https://cmake.org/licensing for details. */ -#ifndef cm_xmlrpc_h -#define cm_xmlrpc_h - -/* Use the xmlrpc library configured for CMake. */ -#include "cmThirdParty.h" -#ifdef CTEST_USE_XMLRPC -# include -# include -#endif - -#endif -- cgit v0.12 From aebdad399efb1394f904428b52011513f7dd0b7c Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Tue, 27 Nov 2018 20:58:41 +0100 Subject: CTest: Remove submit method 'cp' --- Help/manual/ctest.1.rst | 5 +- Source/CTest/cmCTestSubmitHandler.cxx | 64 ---------------------- Source/CTest/cmCTestSubmitHandler.h | 4 -- Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt | 1 - Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt | 3 - Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt | 1 - Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 1 - 7 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 82be6e3..511764c 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1106,7 +1106,7 @@ Configuration settings include: ``DropMethod`` Specify the method by which results should be submitted to the - dashboard server. The value may be ``cp``, ``ftp``, ``http``, + dashboard server. The value may be ``ftp``, ``http``, ``https``, or ``scp``. * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD` @@ -1114,8 +1114,7 @@ Configuration settings include: else ``CTEST_DROP_METHOD`` ``DropSite`` - The dashboard server name - (for ``ftp``, ``http``, and ``https``, ``scp``). + The dashboard server name. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE` * :module:`CTest` module variable: ``DROP_SITE`` if set, diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 8323381..f457828 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -895,40 +895,6 @@ bool cmCTestSubmitHandler::SubmitUsingSCP( return problems == 0; } -bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix, - const std::vector& files, - const std::string& remoteprefix, - const std::string& destination) -{ - if (localprefix.empty() || files.empty() || remoteprefix.empty() || - destination.empty()) { - /* clang-format off */ - cmCTestLog(this->CTest, ERROR_MESSAGE, - "Missing arguments for submit via cp:\n" - << "\tlocalprefix: " << localprefix << "\n" - << "\tNumber of files: " << files.size() << "\n" - << "\tremoteprefix: " << remoteprefix << "\n" - << "\tdestination: " << destination << std::endl); - /* clang-format on */ - return false; - } - - for (std::string const& file : files) { - std::string lfname = localprefix; - cmSystemTools::ConvertToUnixSlashes(lfname); - lfname += "/" + file; - std::string rfname = destination + "/" + remoteprefix + file; - cmSystemTools::CopyFileAlways(lfname, rfname); - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - " Copy file: " << lfname << " to " << rfname - << std::endl, - this->Quiet); - } - std::string tagDoneFile = destination + "/" + remoteprefix + "DONE"; - cmSystemTools::Touch(tagDoneFile, true); - return true; -} - void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod, std::string& url) { @@ -1514,36 +1480,6 @@ int cmCTestSubmitHandler::ProcessHandler() " Submission successful" << std::endl, this->Quiet); ofs << " Submission successful" << std::endl; return 0; - } else if (dropMethod == "cp") { - std::string location = this->CTest->GetCTestConfiguration("DropLocation"); - - // change to the build directory so that we can uses a relative path - // on windows since scp doesn't support "c:" a drive in the path - cmWorkingDirectory workdir(buildDirectory); - if (workdir.Failed()) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Failed to change directory to " - << buildDirectory << " : " - << std::strerror(workdir.GetLastResult()) << std::endl); - ofs << " Failed to change directory to " << buildDirectory << " : " - << std::strerror(workdir.GetLastResult()) << std::endl; - return -1; - } - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - " Change directory: " << buildDirectory << std::endl, - this->Quiet); - - if (!this->SubmitUsingCP("Testing/" + this->CTest->GetCurrentTag(), files, - prefix, location)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Problems when submitting via CP" << std::endl); - ofs << " Problems when submitting via cp" << std::endl; - return -1; - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Submission successful" << std::endl, this->Quiet); - ofs << " Submission successful" << std::endl; - return 0; } cmCTestLog(this->CTest, ERROR_MESSAGE, diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 0f33735..5590561 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -68,10 +68,6 @@ private: const std::vector& files, const std::string& remoteprefix, const std::string& url); - bool SubmitUsingCP(const std::string& localprefix, - const std::vector& files, - const std::string& remoteprefix, const std::string& url); - bool TriggerUsingHTTP(const std::vector& files, const std::string& remoteprefix, const std::string& url); diff --git a/Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt deleted file mode 100644 index 00a60ac..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -Missing arguments for submit via cp: -.* - Problems when submitting via CP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt deleted file mode 100644 index fa6e004..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Submit files \(using cp\) diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index fc24f64..b945ff6 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -49,7 +49,6 @@ function(run_ctest_submit_FailDrop CASE_DROP_METHOD) run_ctest(FailDrop-${CASE_DROP_METHOD}) endfunction() -run_ctest_submit_FailDrop(cp) run_ctest_submit_FailDrop(ftp) run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) -- cgit v0.12 From c339b64cf241788edd9f886daff619eec41dc242 Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Tue, 27 Nov 2018 22:35:00 +0100 Subject: CTest: Remove submit method 'scp' --- Help/manual/ctest.1.rst | 6 +- Help/variable/CTEST_SCP_COMMAND.rst | 3 +- Modules/CTest.cmake | 3 - Modules/DartConfiguration.tcl.in | 1 - Source/CTest/cmCTestSubmitCommand.cxx | 2 - Source/CTest/cmCTestSubmitHandler.cxx | 133 --------------------- Source/CTest/cmCTestSubmitHandler.h | 4 - .../RunCMake/ctest_submit/FailDrop-scp-result.txt | 1 - .../RunCMake/ctest_submit/FailDrop-scp-stderr.txt | 1 - .../RunCMake/ctest_submit/FailDrop-scp-stdout.txt | 1 - Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 1 - 11 files changed, 4 insertions(+), 152 deletions(-) delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 511764c..1ac5efd 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1106,8 +1106,8 @@ Configuration settings include: ``DropMethod`` Specify the method by which results should be submitted to the - dashboard server. The value may be ``ftp``, ``http``, - ``https``, or ``scp``. + dashboard server. The value may be ``ftp``, ``http``, or + ``https``. * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD` * :module:`CTest` module variable: ``DROP_METHOD`` if set, @@ -1144,7 +1144,7 @@ Configuration settings include: * :module:`CTest` module variable: ``CTEST_DROP_SITE_CDASH`` ``ScpCommand`` - ``scp`` command-line tool to use when ``DropMethod`` is ``scp``. + Legacy option. Not used. * `CTest Script`_ variable: :variable:`CTEST_SCP_COMMAND` * :module:`CTest` module variable: ``SCPCOMMAND`` diff --git a/Help/variable/CTEST_SCP_COMMAND.rst b/Help/variable/CTEST_SCP_COMMAND.rst index 0f128b1..19ea8b3 100644 --- a/Help/variable/CTEST_SCP_COMMAND.rst +++ b/Help/variable/CTEST_SCP_COMMAND.rst @@ -1,5 +1,4 @@ CTEST_SCP_COMMAND ----------------- -Specify the CTest ``SCPCommand`` setting -in a :manual:`ctest(1)` dashboard client script. +Legacy option. Not used. diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 18bb452..8848bdd 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -177,9 +177,6 @@ if(BUILD_TESTING) ) set(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH "File that contains suppressions for the memory checker") - find_program(SCPCOMMAND scp DOC - "Path to scp command, used by CTest for submitting results to a Dart server" - ) find_program(COVERAGE_COMMAND gcov DOC "Path to the coverage program that CTest uses for performing coverage inspection" ) diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index b86a5a9..735cadd 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -30,7 +30,6 @@ DropSitePassword: @DROP_SITE_PASSWORD@ DropSiteMode: @DROP_SITE_MODE@ DropMethod: @DROP_METHOD@ TriggerSite: @TRIGGER_SITE@ -ScpCommand: @SCPCOMMAND@ # Dashboard start time NightlyStartTime: @NIGHTLY_START_TIME@ diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 60029ab..c1705d7 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -58,8 +58,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() this->CTest->SetCTestConfigurationFromCMakeVariable( this->Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD", this->Quiet); - this->CTest->SetCTestConfigurationFromCMakeVariable( - this->Makefile, "ScpCommand", "CTEST_SCP_COMMAND", this->Quiet); const char* notesFilesVariable = this->Makefile->GetDefinition("CTEST_NOTES_FILES"); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index f457828..2232e38 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -5,9 +5,7 @@ #include "cm_curl.h" #include "cm_jsoncpp_reader.h" #include "cm_jsoncpp_value.h" -#include "cmsys/Process.h" #include -#include #include #include #include @@ -20,10 +18,8 @@ #include "cmCurl.h" #include "cmDuration.h" #include "cmGeneratedFileStream.h" -#include "cmProcessOutput.h" #include "cmState.h" #include "cmSystemTools.h" -#include "cmWorkingDirectory.h" #include "cmXMLParser.h" #include "cmake.h" @@ -799,102 +795,6 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP( return true; } -bool cmCTestSubmitHandler::SubmitUsingSCP( - const std::string& scp_command, const std::string& localprefix, - const std::vector& files, const std::string& remoteprefix, - const std::string& url) -{ - if (scp_command.empty() || localprefix.empty() || files.empty() || - remoteprefix.empty() || url.empty()) { - return false; - } - - std::vector argv; - argv.push_back(scp_command.c_str()); // Scp command - argv.push_back(scp_command.c_str()); // Dummy string for file - argv.push_back(scp_command.c_str()); // Dummy string for remote url - argv.push_back(nullptr); - - cmsysProcess* cp = cmsysProcess_New(); - cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); - // cmsysProcess_SetTimeout(cp, timeout); - - int problems = 0; - - for (std::string const& file : files) { - int retVal; - - std::string lfname = localprefix; - cmSystemTools::ConvertToUnixSlashes(lfname); - lfname += "/" + file; - lfname = cmSystemTools::ConvertToOutputPath(lfname); - argv[1] = lfname.c_str(); - std::string rfname = url + "/" + remoteprefix + file; - argv[2] = rfname.c_str(); - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \"" - << argv[2] << "\"" << std::endl, - this->Quiet); - *this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \"" - << argv[2] << "\"" << std::endl; - - cmsysProcess_SetCommand(cp, &*argv.begin()); - cmsysProcess_Execute(cp); - char* data; - int length; - cmProcessOutput processOutput; - std::string strdata; - - while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) { - processOutput.DecodeText(data, length, strdata); - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - cmCTestLogWrite(strdata.c_str(), strdata.size()), - this->Quiet); - } - processOutput.DecodeText(std::string(), strdata); - if (!strdata.empty()) { - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - cmCTestLogWrite(strdata.c_str(), strdata.size()), - this->Quiet); - } - - cmsysProcess_WaitForExit(cp, nullptr); - - int result = cmsysProcess_GetState(cp); - - if (result == cmsysProcess_State_Exited) { - retVal = cmsysProcess_GetExitValue(cp); - if (retVal != 0) { - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - "\tSCP returned: " << retVal << std::endl, - this->Quiet); - *this->LogFile << "\tSCP returned: " << retVal << std::endl; - problems++; - } - } else if (result == cmsysProcess_State_Exception) { - retVal = cmsysProcess_GetExitException(cp); - cmCTestLog(this->CTest, ERROR_MESSAGE, - "\tThere was an exception: " << retVal << std::endl); - *this->LogFile << "\tThere was an exception: " << retVal << std::endl; - problems++; - } else if (result == cmsysProcess_State_Expired) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - "\tThere was a timeout" << std::endl); - *this->LogFile << "\tThere was a timeout" << std::endl; - problems++; - } else if (result == cmsysProcess_State_Error) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - "\tError executing SCP: " << cmsysProcess_GetErrorString(cp) - << std::endl); - *this->LogFile << "\tError executing SCP: " - << cmsysProcess_GetErrorString(cp) << std::endl; - problems++; - } - } - cmsysProcess_Delete(cp); - return problems == 0; -} - void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod, std::string& url) { @@ -1447,39 +1347,6 @@ int cmCTestSubmitHandler::ProcessHandler() } return 0; - } else if (dropMethod == "scp") { - std::string url; - if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) { - url += this->CTest->GetCTestConfiguration("DropSiteUser") + "@"; - } - url += this->CTest->GetCTestConfiguration("DropSite") + ":" + - this->CTest->GetCTestConfiguration("DropLocation"); - - // change to the build directory so that we can uses a relative path - // on windows since scp doesn't support "c:" a drive in the path - cmWorkingDirectory workdir(buildDirectory); - if (workdir.Failed()) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Failed to change directory to " - << buildDirectory << " : " - << std::strerror(workdir.GetLastResult()) << std::endl); - ofs << " Failed to change directory to " << buildDirectory << " : " - << std::strerror(workdir.GetLastResult()) << std::endl; - return -1; - } - - if (!this->SubmitUsingSCP(this->CTest->GetCTestConfiguration("ScpCommand"), - "Testing/" + this->CTest->GetCurrentTag(), files, - prefix, url)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Problems when submitting via SCP" << std::endl); - ofs << " Problems when submitting via SCP" << std::endl; - return -1; - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Submission successful" << std::endl, this->Quiet); - ofs << " Submission successful" << std::endl; - return 0; } cmCTestLog(this->CTest, ERROR_MESSAGE, diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 5590561..5cbc9f6 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -63,10 +63,6 @@ private: const std::vector& files, const std::string& remoteprefix, const std::string& url); - bool SubmitUsingSCP(const std::string& scp_command, - const std::string& localprefix, - const std::vector& files, - const std::string& remoteprefix, const std::string& url); bool TriggerUsingHTTP(const std::vector& files, const std::string& remoteprefix, diff --git a/Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt deleted file mode 100644 index ef67149..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt +++ /dev/null @@ -1 +0,0 @@ - Problems when submitting via SCP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt deleted file mode 100644 index ec2ce92..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Submit files \(using scp\) diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index b945ff6..097818c 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -52,4 +52,3 @@ endfunction() run_ctest_submit_FailDrop(ftp) run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) -run_ctest_submit_FailDrop(scp) -- cgit v0.12 From a688c6b92861c77ee8d065ae8c679c317fe8d0c0 Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Tue, 27 Nov 2018 21:15:57 +0100 Subject: CTest: Remove submit method 'ftp' --- Help/manual/ctest.1.rst | 3 +- Source/CTest/cmCTestSubmitHandler.cxx | 239 +-------------------- Source/CTest/cmCTestSubmitHandler.h | 5 - .../RunCMake/ctest_submit/FailDrop-ftp-result.txt | 1 - .../RunCMake/ctest_submit/FailDrop-ftp-stderr.txt | 2 - .../RunCMake/ctest_submit/FailDrop-ftp-stdout.txt | 3 - Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 1 - 7 files changed, 6 insertions(+), 248 deletions(-) delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt delete mode 100644 Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 1ac5efd..3999feb 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1106,8 +1106,7 @@ Configuration settings include: ``DropMethod`` Specify the method by which results should be submitted to the - dashboard server. The value may be ``ftp``, ``http``, or - ``https``. + dashboard server. The value may be ``http`` or ``https``. * `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD` * :module:`CTest` module variable: ``DROP_METHOD`` if set, diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 2232e38..509d767 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -120,7 +120,6 @@ static size_t cmCTestSubmitHandlerCurlDebugCallback(CURL* /*unused*/, cmCTestSubmitHandler::cmCTestSubmitHandler() : HTTPProxy() - , FTPProxy() { this->Initialize(); } @@ -139,158 +138,10 @@ void cmCTestSubmitHandler::Initialize() this->HTTPProxy.clear(); this->HTTPProxyType = 0; this->HTTPProxyAuth.clear(); - this->FTPProxy.clear(); - this->FTPProxyType = 0; this->LogFile = nullptr; this->Files.clear(); } -bool cmCTestSubmitHandler::SubmitUsingFTP( - const std::string& localprefix, const std::vector& files, - const std::string& remoteprefix, const std::string& url) -{ - CURL* curl; - CURLcode res; - FILE* ftpfile; - 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->FTPProxyType > 0) { - curl_easy_setopt(curl, CURLOPT_PROXY, this->FTPProxy.c_str()); - switch (this->FTPProxyType) { - 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); - } - } - - // enable uploading - ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); - - // if there is little to no activity for too long stop submitting - ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); - ::curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, - SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT); - - ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1); - - std::string local_file = file; - if (!cmSystemTools::FileExists(local_file)) { - local_file = localprefix + "/" + file; - } - std::string upload_as = - url + "/" + remoteprefix + cmSystemTools::GetFilenameName(file); - - if (!cmSystemTools::FileExists(local_file)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Cannot find file: " << local_file << std::endl); - ::curl_easy_cleanup(curl); - ::curl_global_cleanup(); - return false; - } - unsigned long filelen = cmSystemTools::FileLength(local_file); - - ftpfile = cmsys::SystemTools::Fopen(local_file, "rb"); - *this->LogFile << "\tUpload file: " << local_file << " to " << upload_as - << std::endl; - cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, - " Upload file: " << local_file << " to " - << upload_as << std::endl, - this->Quiet); - - ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); - - // specify target - ::curl_easy_setopt(curl, CURLOPT_URL, upload_as.c_str()); - - // now specify which file to upload - ::curl_easy_setopt(curl, CURLOPT_INFILE, ftpfile); - - // and give the size of the upload (optional) - ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, static_cast(filelen)); - - // 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); - - // Now run off and do what you've been told! - res = ::curl_easy_perform(curl); - - 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); - } - - fclose(ftpfile); - if (res) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Error when uploading file: " << local_file - << std::endl); - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Error message was: " << error_buffer << std::endl); - *this->LogFile << " Error when uploading file: " << local_file - << std::endl - << " Error message was: " << error_buffer << std::endl - << " Curl output was: "; - // avoid dereference of empty vector - if (!chunk.empty()) { - *this->LogFile << cmCTestLogWrite(&*chunk.begin(), chunk.size()); - cmCTestLog(this->CTest, ERROR_MESSAGE, - "CURL output: [" - << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" - << std::endl); - } - *this->LogFile << std::endl; - ::curl_easy_cleanup(curl); - ::curl_global_cleanup(); - return false; - } - // always cleanup - ::curl_easy_cleanup(curl); - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Uploaded: " + local_file << std::endl, - this->Quiet); - } - } - ::curl_global_cleanup(); - return true; -} - -// Uploading files is simpler bool cmCTestSubmitHandler::SubmitUsingHTTP( const std::string& localprefix, const std::vector& files, const std::string& remoteprefix, const std::string& url) @@ -1091,36 +942,11 @@ int cmCTestSubmitHandler::ProcessHandler() } } - if (getenv("FTP_PROXY")) { - this->FTPProxyType = 1; - this->FTPProxy = getenv("FTP_PROXY"); - if (getenv("FTP_PROXY_PORT")) { - this->FTPProxy += ":"; - this->FTPProxy += getenv("FTP_PROXY_PORT"); - } - if (getenv("FTP_PROXY_TYPE")) { - std::string type = getenv("FTP_PROXY_TYPE"); - // HTTP/SOCKS4/SOCKS5 - if (type == "HTTP") { - this->FTPProxyType = 1; - } else if (type == "SOCKS4") { - this->FTPProxyType = 2; - } else if (type == "SOCKS5") { - this->FTPProxyType = 3; - } - } - } - if (!this->HTTPProxy.empty()) { cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use HTTP Proxy: " << this->HTTPProxy << std::endl, this->Quiet); } - if (!this->FTPProxy.empty()) { - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Use FTP Proxy: " << this->FTPProxy << std::endl, - this->Quiet); - } cmGeneratedFileStream ofs; this->StartLogFile("Submit", ofs); @@ -1217,66 +1043,11 @@ int cmCTestSubmitHandler::ProcessHandler() std::string dropMethod(this->CTest->GetCTestConfiguration("DropMethod")); - if (dropMethod.empty() || dropMethod == "ftp") { - ofs << "Using drop method: FTP" << std::endl; - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Using FTP submit method" << std::endl - << " Drop site: ftp://", - this->Quiet); - std::string url = "ftp://"; - url += cmCTest::MakeURLSafe( - this->CTest->GetCTestConfiguration("DropSiteUser")) + - ":" + - cmCTest::MakeURLSafe( - this->CTest->GetCTestConfiguration("DropSitePassword")) + - "@" + this->CTest->GetCTestConfiguration("DropSite") + - cmCTest::MakeURLSafe(this->CTest->GetCTestConfiguration("DropLocation")); - if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) { - cmCTestOptionalLog( - this->CTest, HANDLER_OUTPUT, - this->CTest->GetCTestConfiguration("DropSiteUser").c_str(), - this->Quiet); - if (!this->CTest->GetCTestConfiguration("DropSitePassword").empty()) { - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, ":******", - this->Quiet); - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "@", this->Quiet); - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - this->CTest->GetCTestConfiguration("DropSite") - << this->CTest->GetCTestConfiguration("DropLocation") - << std::endl, - this->Quiet); - if (!this->SubmitUsingFTP(buildDirectory + "/Testing/" + - this->CTest->GetCurrentTag(), - files, prefix, url)) { - cmCTestLog(this->CTest, ERROR_MESSAGE, - " Problems when submitting via FTP" << std::endl); - ofs << " Problems when submitting via FTP" << 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; - } - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, - " Submission successful" << std::endl, this->Quiet); - ofs << " Submission successful" << std::endl; - return 0; - } - } else if (dropMethod == "http" || dropMethod == "https") { + if (dropMethod.empty()) { + dropMethod = "http"; + } + + if (dropMethod == "http" || dropMethod == "https") { std::string url = dropMethod; url += "://"; ofs << "Using drop method: " << dropMethod << std::endl; diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index 5cbc9f6..15f230b 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -56,9 +56,6 @@ private: /** * Submit file using various ways */ - bool SubmitUsingFTP(const std::string& localprefix, - const std::vector& files, - const std::string& remoteprefix, const std::string& url); bool SubmitUsingHTTP(const std::string& localprefix, const std::vector& files, const std::string& remoteprefix, @@ -79,8 +76,6 @@ private: std::string HTTPProxy; int HTTPProxyType; std::string HTTPProxyAuth; - std::string FTPProxy; - int FTPProxyType; std::ostream* LogFile; bool SubmitPart[cmCTest::PartCount]; bool CDash; diff --git a/Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt deleted file mode 100644 index b9d9394..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) - Problems when submitting via FTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt deleted file mode 100644 index 345bb62..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt +++ /dev/null @@ -1,3 +0,0 @@ -Submit files \(using ftp\) - Using FTP submit method - Drop site: ftp:// diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index 097818c..4d7d29b 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -49,6 +49,5 @@ function(run_ctest_submit_FailDrop CASE_DROP_METHOD) run_ctest(FailDrop-${CASE_DROP_METHOD}) endfunction() -run_ctest_submit_FailDrop(ftp) run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) -- cgit v0.12 From 8c25aa2feb589f733b5b80ec231217fc31518752 Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Tue, 27 Nov 2018 23:19:32 +0100 Subject: CTest: Remove submission trigger --- Help/manual/ctest.1.rst | 5 +- Help/variable/CTEST_TRIGGER_SITE.rst | 3 +- Modules/DartConfiguration.tcl.in | 1 - Source/CTest/cmCTestSubmitCommand.cxx | 9 -- Source/CTest/cmCTestSubmitHandler.cxx | 153 ---------------------------------- Source/CTest/cmCTestSubmitHandler.h | 5 -- 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& 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(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& files, - const std::string& remoteprefix, - const std::string& url); - typedef std::vector 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; -- cgit v0.12 From e184603378e85046fb6e4d627f47e9853577486e Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Tue, 27 Nov 2018 23:39:36 +0100 Subject: CTest: Add release note about removed submission methods --- Help/release/dev/submit-method.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Help/release/dev/submit-method.rst diff --git a/Help/release/dev/submit-method.rst b/Help/release/dev/submit-method.rst new file mode 100644 index 0000000..38f0b92 --- /dev/null +++ b/Help/release/dev/submit-method.rst @@ -0,0 +1,6 @@ +submit-method +------------- + +* CTest no longer supports submissions via ``ftp``, ``scp``, ``cp``, and + ``xmlrpc``. CDash is the only maintained testing dashboard for CTest, + and it only supports submissions over ``http`` and ``https``. -- cgit v0.12 From 9501a6145dfc5d3905d6b241d6599806ec40fd38 Mon Sep 17 00:00:00 2001 From: Regina Pfeifer Date: Wed, 28 Nov 2018 00:10:14 +0100 Subject: CTest: Remove special case for Dart version <= 1 --- Help/manual/ctest.1.rst | 5 ++--- Modules/DartConfiguration.tcl.in | 3 --- Source/CTest/cmCTestHandlerCommand.cxx | 13 +------------ Source/CTest/cmCTestSubmitCommand.cxx | 4 ---- Source/cmCTest.cxx | 16 ---------------- Source/cmCTest.h | 7 ------- Tests/CTestTestBadExe/CTestConfig.cmake | 2 -- Tests/CTestTestBadGenerator/CTestConfig.cmake | 2 -- Tests/CTestTestCostSerial/CTestConfig.cmake | 2 -- Tests/CTestTestCrash/CTestConfig.cmake | 2 -- Tests/CTestTestCycle/CTestConfig.cmake | 2 -- Tests/CTestTestDepends/CTestConfig.cmake | 2 -- Tests/CTestTestFailure/CTestConfig.cmake | 2 -- .../launcher_compiler_test_project/CTestConfig.cmake | 2 -- .../CTestConfig.cmake | 2 -- .../launcher_linker_test_project/CTestConfig.cmake | 2 -- Tests/CTestTestParallel/CTestConfig.cmake | 2 -- Tests/CTestTestResourceLock/CTestConfig.cmake | 2 -- Tests/CTestTestScheduler/CTestConfig.cmake | 2 -- Tests/CTestTestSkipReturnCode/CTestConfig.cmake | 2 -- Tests/CTestTestStopTime/CTestConfig.cmake | 2 -- Tests/CTestTestSubdir/CTestConfig.cmake | 2 -- Tests/CTestTestTimeout/CTestConfig.cmake | 2 -- Tests/CTestTestUpload/CTestConfig.cmake | 2 -- Tests/CTestTestVerboseOutput/CTestConfig.cmake | 2 -- Tests/CTestTestZeroTimeout/CTestConfig.cmake | 2 -- Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in | 2 -- 27 files changed, 3 insertions(+), 87 deletions(-) diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 064a6da..110b08f 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1069,7 +1069,7 @@ Configuration settings include: * :module:`CTest` module variable: ``BUILDNAME`` ``CDashVersion`` - Specify the version of `CDash`_ on the server. + Legacy option. Not used. * `CTest Script`_ variable: none, detected from server * :module:`CTest` module variable: ``CTEST_CDASH_VERSION`` @@ -1136,8 +1136,7 @@ Configuration settings include: else ``CTEST_DROP_SITE_USER`` ``IsCDash`` - Specify whether the dashboard server is `CDash`_ or an older - dashboard server implementation. + Legacy option. Not used. * `CTest Script`_ variable: :variable:`CTEST_DROP_SITE_CDASH` * :module:`CTest` module variable: ``CTEST_DROP_SITE_CDASH`` diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index 8cf2f4d..24e7b55 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -20,9 +20,6 @@ BuildName: @BUILDNAME@ LabelsForSubprojects: @CTEST_LABELS_FOR_SUBPROJECTS@ # Submission information -IsCDash: @CTEST_DROP_SITE_CDASH@ -CDashVersion: @CTEST_CDASH_VERSION@ -QueryCDashVersion: @CTEST_CDASH_QUERY_VERSION@ DropSite: @DROP_SITE@ DropLocation: @DROP_LOCATION@ DropSiteUser: @DROP_SITE_USER@ diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 667a8ba..c63694d 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -206,18 +206,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector const& args, handler->PopulateCustomVectors(this->Makefile); if (this->Values[ct_SUBMIT_INDEX]) { - if (!this->CTest->GetDropSiteCDash() && - this->CTest->GetDartVersion() <= 1) { - cmCTestLog( - this->CTest, ERROR_MESSAGE, - "Dart before version 2.0 does not support collecting submissions." - << std::endl - << "Please upgrade the server to Dart 2 or higher, or do not use " - "SUBMIT_INDEX." - << std::endl); - } else { - handler->SetSubmitIndex(atoi(this->Values[ct_SUBMIT_INDEX])); - } + handler->SetSubmitIndex(atoi(this->Values[ct_SUBMIT_INDEX])); } cmWorkingDirectory workdir( this->CTest->GetCTestConfiguration("BuildDirectory")); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 2165f40..43bd636 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -20,7 +20,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() const char* ctestDropSite = this->Makefile->GetDefinition("CTEST_DROP_SITE"); const char* ctestDropLocation = this->Makefile->GetDefinition("CTEST_DROP_LOCATION"); - bool ctestDropSiteCDash = this->Makefile->IsOn("CTEST_DROP_SITE_CDASH"); if (!ctestDropMethod) { ctestDropMethod = "http"; } @@ -39,9 +38,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation, this->Quiet); - this->CTest->SetCTestConfiguration( - "IsCDash", ctestDropSiteCDash ? "TRUE" : "FALSE", this->Quiet); - this->CTest->SetCTestConfigurationFromCMakeVariable( this->Makefile, "CurlOptions", "CTEST_CURL_OPTIONS", this->Quiet); this->CTest->SetCTestConfigurationFromCMakeVariable( diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index d35d41e..7c19864 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -292,8 +292,6 @@ cmCTest::cmCTest() this->OutputLogFile = nullptr; this->OutputLogFileLastTag = -1; this->SuppressUpdatingCTestConfiguration = false; - this->DartVersion = 1; - this->DropSiteCDash = false; this->BuildID = ""; this->OutputTestOutputOnTestFailure = false; this->OutputColorCode = cmCTest::ColoredOutputSupportedByConsole(); @@ -613,8 +611,6 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) { std::string src_dir = this->GetCTestConfiguration("SourceDirectory"); std::string bld_dir = this->GetCTestConfiguration("BuildDirectory"); - this->DartVersion = 1; - this->DropSiteCDash = false; this->BuildID = ""; for (Part p = PartStart; p != PartCount; p = Part(p + 1)) { this->Parts[p].SubmitFiles.clear(); @@ -658,18 +654,6 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) command->ShouldBeQuiet()); this->SetCTestConfigurationFromCMakeVariable( mf, "BuildName", "CTEST_BUILD_NAME", command->ShouldBeQuiet()); - const char* dartVersion = mf->GetDefinition("CTEST_DART_SERVER_VERSION"); - if (dartVersion) { - this->DartVersion = atoi(dartVersion); - if (this->DartVersion < 0) { - cmCTestLog(this, ERROR_MESSAGE, - "Invalid Dart server version: " - << dartVersion << ". Please specify the version number." - << std::endl); - return false; - } - } - this->DropSiteCDash = mf->IsOn("CTEST_DROP_SITE_CDASH"); if (!this->Initialize(bld_dir.c_str(), command)) { return false; diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 9139e42..7da0e1d 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -418,10 +418,6 @@ public: /** Get color code characters for a specific color */ std::string GetColorCode(Color color) const; - /** Get the version of dart server */ - int GetDartVersion() { return this->DartVersion; } - int GetDropSiteCDash() { return this->DropSiteCDash; } - /** The Build ID is assigned by CDash */ void SetBuildID(const std::string& id) { this->BuildID = id; } std::string GetBuildID() { return this->BuildID; } @@ -633,9 +629,6 @@ private: bool ShowLineNumbers; bool Quiet; - int DartVersion; - bool DropSiteCDash; - std::string BuildID; std::vector InitialCommandLineArguments; diff --git a/Tests/CTestTestBadExe/CTestConfig.cmake b/Tests/CTestTestBadExe/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestBadExe/CTestConfig.cmake +++ b/Tests/CTestTestBadExe/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestBadGenerator/CTestConfig.cmake b/Tests/CTestTestBadGenerator/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestBadGenerator/CTestConfig.cmake +++ b/Tests/CTestTestBadGenerator/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCostSerial/CTestConfig.cmake b/Tests/CTestTestCostSerial/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestCostSerial/CTestConfig.cmake +++ b/Tests/CTestTestCostSerial/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCrash/CTestConfig.cmake b/Tests/CTestTestCrash/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestCrash/CTestConfig.cmake +++ b/Tests/CTestTestCrash/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCycle/CTestConfig.cmake b/Tests/CTestTestCycle/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestCycle/CTestConfig.cmake +++ b/Tests/CTestTestCycle/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestDepends/CTestConfig.cmake b/Tests/CTestTestDepends/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestDepends/CTestConfig.cmake +++ b/Tests/CTestTestDepends/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestFailure/CTestConfig.cmake b/Tests/CTestTestFailure/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestFailure/CTestConfig.cmake +++ b/Tests/CTestTestFailure/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake index 409d83a..c08eded 100644 --- a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake @@ -1,7 +1,5 @@ set(CTEST_USE_LAUNCHERS 1) set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake index 409d83a..c08eded 100644 --- a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake @@ -1,7 +1,5 @@ set(CTEST_USE_LAUNCHERS 1) set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake index 409d83a..c08eded 100644 --- a/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake @@ -1,7 +1,5 @@ set(CTEST_USE_LAUNCHERS 1) set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestParallel/CTestConfig.cmake b/Tests/CTestTestParallel/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestParallel/CTestConfig.cmake +++ b/Tests/CTestTestParallel/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestResourceLock/CTestConfig.cmake b/Tests/CTestTestResourceLock/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestResourceLock/CTestConfig.cmake +++ b/Tests/CTestTestResourceLock/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestScheduler/CTestConfig.cmake b/Tests/CTestTestScheduler/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestScheduler/CTestConfig.cmake +++ b/Tests/CTestTestScheduler/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake +++ b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestStopTime/CTestConfig.cmake b/Tests/CTestTestStopTime/CTestConfig.cmake index fc5bffc..5bc1e9e 100644 --- a/Tests/CTestTestStopTime/CTestConfig.cmake +++ b/Tests/CTestTestStopTime/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestSubdir/CTestConfig.cmake b/Tests/CTestTestSubdir/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestSubdir/CTestConfig.cmake +++ b/Tests/CTestTestSubdir/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestTimeout/CTestConfig.cmake b/Tests/CTestTestTimeout/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestTimeout/CTestConfig.cmake +++ b/Tests/CTestTestTimeout/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestUpload/CTestConfig.cmake b/Tests/CTestTestUpload/CTestConfig.cmake index 95c79ff..21318b4 100644 --- a/Tests/CTestTestUpload/CTestConfig.cmake +++ b/Tests/CTestTestUpload/CTestConfig.cmake @@ -1,6 +1,4 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set (CTEST_DROP_METHOD "http") set (CTEST_DROP_SITE "open.cdash.org") set (CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set (CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestVerboseOutput/CTestConfig.cmake b/Tests/CTestTestVerboseOutput/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestVerboseOutput/CTestConfig.cmake +++ b/Tests/CTestTestVerboseOutput/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestZeroTimeout/CTestConfig.cmake b/Tests/CTestTestZeroTimeout/CTestConfig.cmake index faa91f0..bd265f9 100644 --- a/Tests/CTestTestZeroTimeout/CTestConfig.cmake +++ b/Tests/CTestTestZeroTimeout/CTestConfig.cmake @@ -1,6 +1,4 @@ set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in b/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in index fe6f6ce..53bdd20 100644 --- a/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in @@ -1,8 +1,6 @@ set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) @CTEST_EXTRA_CONFIG@ -- cgit v0.12