mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 08:08:24 -05:00
CTest: Remove submit method 'cp'
This commit is contained in:
@@ -1106,7 +1106,7 @@ Configuration settings include:
|
|||||||
|
|
||||||
``DropMethod``
|
``DropMethod``
|
||||||
Specify the method by which results should be submitted to the
|
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``.
|
``https``, or ``scp``.
|
||||||
|
|
||||||
* `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD`
|
* `CTest Script`_ variable: :variable:`CTEST_DROP_METHOD`
|
||||||
@@ -1114,8 +1114,7 @@ Configuration settings include:
|
|||||||
else ``CTEST_DROP_METHOD``
|
else ``CTEST_DROP_METHOD``
|
||||||
|
|
||||||
``DropSite``
|
``DropSite``
|
||||||
The dashboard server name
|
The dashboard server name.
|
||||||
(for ``ftp``, ``http``, and ``https``, ``scp``).
|
|
||||||
|
|
||||||
* `CTest Script`_ variable: :variable:`CTEST_DROP_SITE`
|
* `CTest Script`_ variable: :variable:`CTEST_DROP_SITE`
|
||||||
* :module:`CTest` module variable: ``DROP_SITE`` if set,
|
* :module:`CTest` module variable: ``DROP_SITE`` if set,
|
||||||
|
|||||||
@@ -895,40 +895,6 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(
|
|||||||
return problems == 0;
|
return problems == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
|
|
||||||
const std::vector<std::string>& 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,
|
void cmCTestSubmitHandler::ConstructCDashURL(std::string& dropMethod,
|
||||||
std::string& url)
|
std::string& url)
|
||||||
{
|
{
|
||||||
@@ -1514,36 +1480,6 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
" Submission successful" << std::endl, this->Quiet);
|
" Submission successful" << std::endl, this->Quiet);
|
||||||
ofs << " Submission successful" << std::endl;
|
ofs << " Submission successful" << std::endl;
|
||||||
return 0;
|
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,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
|||||||
@@ -68,10 +68,6 @@ private:
|
|||||||
const std::vector<std::string>& files,
|
const std::vector<std::string>& files,
|
||||||
const std::string& remoteprefix, const std::string& url);
|
const std::string& remoteprefix, const std::string& url);
|
||||||
|
|
||||||
bool SubmitUsingCP(const std::string& localprefix,
|
|
||||||
const std::vector<std::string>& files,
|
|
||||||
const std::string& remoteprefix, const std::string& url);
|
|
||||||
|
|
||||||
bool TriggerUsingHTTP(const std::vector<std::string>& files,
|
bool TriggerUsingHTTP(const std::vector<std::string>& files,
|
||||||
const std::string& remoteprefix,
|
const std::string& remoteprefix,
|
||||||
const std::string& url);
|
const std::string& url);
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
(-1|255)
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
Missing arguments for submit via cp:
|
|
||||||
.*
|
|
||||||
Problems when submitting via CP
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Submit files \(using cp\)
|
|
||||||
@@ -49,7 +49,6 @@ function(run_ctest_submit_FailDrop CASE_DROP_METHOD)
|
|||||||
run_ctest(FailDrop-${CASE_DROP_METHOD})
|
run_ctest(FailDrop-${CASE_DROP_METHOD})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
run_ctest_submit_FailDrop(cp)
|
|
||||||
run_ctest_submit_FailDrop(ftp)
|
run_ctest_submit_FailDrop(ftp)
|
||||||
run_ctest_submit_FailDrop(http)
|
run_ctest_submit_FailDrop(http)
|
||||||
run_ctest_submit_FailDrop(https)
|
run_ctest_submit_FailDrop(https)
|
||||||
|
|||||||
Reference in New Issue
Block a user