Add the FILES keyword to ctest_upload command
This commit is contained in:
parent
28cdd0a5be
commit
6b6f309c5f
|
@ -33,6 +33,11 @@ cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler()
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg)
|
bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg)
|
||||||
{
|
{
|
||||||
|
if(arg == "FILES")
|
||||||
|
{
|
||||||
|
this->ArgumentDoing = ArgumentDoingFiles;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return this->CheckArgumentValue(arg);
|
return this->CheckArgumentValue(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +45,8 @@ bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg)
|
bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg)
|
||||||
{
|
{
|
||||||
|
if(this->ArgumentDoing == ArgumentDoingFiles)
|
||||||
|
{
|
||||||
cmStdString filename(arg);
|
cmStdString filename(arg);
|
||||||
if(cmSystemTools::FileExists(filename.c_str()))
|
if(cmSystemTools::FileExists(filename.c_str()))
|
||||||
{
|
{
|
||||||
|
@ -52,6 +59,11 @@ bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg)
|
||||||
e << "File \"" << filename << "\" does not exist. Cannot submit "
|
e << "File \"" << filename << "\" does not exist. Cannot submit "
|
||||||
<< "a non-existent file.";
|
<< "a non-existent file.";
|
||||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
|
||||||
|
this->ArgumentDoing = ArgumentDoingError;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Look for other arguments.
|
||||||
|
return this->Superclass::CheckArgumentValue(arg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
virtual const char* GetFullDocumentation()
|
virtual const char* GetFullDocumentation()
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
" ctest_upload(...)\n"
|
" ctest_upload(FILES ...)\n"
|
||||||
"Pass a list of files to be sent along with the build results to "
|
"Pass a list of files to be sent along with the build results to "
|
||||||
"the dashboard server.\n";
|
"the dashboard server.\n";
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,12 @@ protected:
|
||||||
virtual bool CheckArgumentKeyword(std::string const& arg);
|
virtual bool CheckArgumentKeyword(std::string const& arg);
|
||||||
virtual bool CheckArgumentValue(std::string const& arg);
|
virtual bool CheckArgumentValue(std::string const& arg);
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ArgumentDoingFiles = Superclass::ArgumentDoingLast1,
|
||||||
|
ArgumentDoingLast2
|
||||||
|
};
|
||||||
|
|
||||||
cmCTest::SetOfStrings Files;
|
cmCTest::SetOfStrings Files;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,5 +13,5 @@ SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
|
||||||
CTEST_START(Experimental)
|
CTEST_START(Experimental)
|
||||||
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
CTEST_UPLOAD("${CTEST_SOURCE_DIRECTORY}/sleep.c" "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
|
CTEST_UPLOAD(FILES "${CTEST_SOURCE_DIRECTORY}/sleep.c" "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt")
|
||||||
CTEST_SUBMIT()
|
CTEST_SUBMIT()
|
||||||
|
|
Loading…
Reference in New Issue