[Cmake-commits] CMake branch, next, updated. v2.8.4-929-g633f628
Zach Mullen
zach.mullen at kitware.com
Fri Feb 18 12:18:01 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 633f6285702d4c044735f119f1b7ef645f808eb6 (commit)
via 42fe75460ab34786a48431e804e31f2d91104104 (commit)
from 7cc232e7d010e242a7703c4d48f7096ea5c6072e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=633f6285702d4c044735f119f1b7ef645f808eb6
commit 633f6285702d4c044735f119f1b7ef645f808eb6
Merge: 7cc232e 42fe754
Author: Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Fri Feb 18 12:17:47 2011 -0500
Commit: Zach Mullen <zach.mullen at kitware.com>
CommitDate: Fri Feb 18 12:17:47 2011 -0500
Merge branch 'upload-built-files' into next
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42fe75460ab34786a48431e804e31f2d91104104
commit 42fe75460ab34786a48431e804e31f2d91104104
Author: Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Fri Feb 18 12:11:51 2011 -0500
Commit: Zach Mullen <zach.mullen at kitware.com>
CommitDate: Fri Feb 18 12:11:51 2011 -0500
Implement ctest_upload command
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 7722c19..e284967 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -343,7 +343,7 @@ TARGET_LINK_LIBRARIES(CMakeLib cmsys
${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES}
${CMAKE_CURL_LIBRARIES} )
-# On Apple we need Carbon
+# On Apple we need CoreFoundation
IF(APPLE)
TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation")
ENDIF(APPLE)
@@ -394,6 +394,8 @@ SET(CTEST_SRCS cmCTest.cxx
CTest/cmCTestTestHandler.cxx
CTest/cmCTestUpdateCommand.cxx
CTest/cmCTestUpdateHandler.cxx
+ CTest/cmCTestUploadCommand.cxx
+ CTest/cmCTestUploadHandler.cxx
CTest/cmCTestVC.cxx
CTest/cmCTestVC.h
@@ -465,7 +467,7 @@ IF(APPLE)
ADD_EXECUTABLE(OSXScriptLauncher
CPack/OSXScriptLauncher.cxx)
TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys)
- TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework Carbon")
+ TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework CoreFoundation")
ENDIF(APPLE)
# Build CMake executable
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index fdf17e0..5841b8d 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -50,6 +50,7 @@
#include "cmCTestSubmitCommand.h"
#include "cmCTestTestCommand.h"
#include "cmCTestUpdateCommand.h"
+#include "cmCTestUploadCommand.h"
#define CTEST_INITIAL_CMAKE_OUTPUT_FILE_NAME "CTestInitialCMakeOutput.log"
@@ -164,7 +165,7 @@ cmCTestScriptHandler::~cmCTestScriptHandler()
//----------------------------------------------------------------------
// just adds an argument to the vector
-void cmCTestScriptHandler::AddConfigurationScript(const char *script,
+void cmCTestScriptHandler::AddConfigurationScript(const char *script,
bool pscope)
{
this->ConfigurationScripts.push_back(script);
@@ -224,12 +225,12 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
argv.push_back("-SR");
argv.push_back(total_script_arg.c_str());
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
- "Executable for CTest is: " <<
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ "Executable for CTest is: " <<
this->CTest->GetCTestExecutable() << "\n");
// now pass through all the other arguments
- std::vector<cmStdString> &initArgs =
+ std::vector<cmStdString> &initArgs =
this->CTest->GetInitialCommandLineArguments();
//*** need to make sure this does not have the current script ***
for(size_t i=1; i < initArgs.size(); ++i)
@@ -252,7 +253,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err);
while(pipe != cmsysProcess_Pipe_None)
{
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: "
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: "
<< line << "\n");
if(pipe == cmsysProcess_Pipe_STDERR)
{
@@ -264,7 +265,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
}
pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err);
}
-
+
// Properly handle output of the build command
cmsysProcess_WaitForExit(cp, 0);
int result = cmsysProcess_GetState(cp);
@@ -278,7 +279,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
{
retVal = cmsysProcess_GetExitException(cp);
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was an exception: "
- << cmsysProcess_GetExceptionString(cp) << " " <<
+ << cmsysProcess_GetExceptionString(cp) << " " <<
retVal << std::endl);
failed = true;
}
@@ -338,7 +339,7 @@ void cmCTestScriptHandler::CreateCMake()
this->Makefile->SetStartDirectory(cwd.c_str());
this->Makefile->SetStartOutputDirectory(cwd.c_str());
- // remove all cmake commands which are not scriptable, since they can't be
+ // remove all cmake commands which are not scriptable, since they can't be
// used in ctest scripts
this->CMake->RemoveUnscriptableCommands();
@@ -357,6 +358,7 @@ void cmCTestScriptHandler::CreateCMake()
this->AddCTestCommand(new cmCTestSubmitCommand);
this->AddCTestCommand(new cmCTestTestCommand);
this->AddCTestCommand(new cmCTestUpdateCommand);
+ this->AddCTestCommand(new cmCTestUploadCommand);
}
void cmCTestScriptHandler::GetCommandDocumentation(
@@ -418,17 +420,17 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
this->Makefile->AddFunctionBlocker(f);
- /* Execute CTestScriptMode.cmake, which loads CMakeDetermineSystem and
- CMakeSystemSpecificInformation, so
+ /* Execute CTestScriptMode.cmake, which loads CMakeDetermineSystem and
+ CMakeSystemSpecificInformation, so
that variables like CMAKE_SYSTEM and also the search paths for libraries,
header and executables are set correctly and can be used. Makes new-style
ctest scripting easier. */
- std::string systemFile =
+ std::string systemFile =
this->Makefile->GetModulesFile("CTestScriptMode.cmake");
if (!this->Makefile->ReadListFile(0, systemFile.c_str()) ||
cmSystemTools::GetErrorOccuredFlag())
- {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
+ {
+ cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:"
<< systemFile.c_str() << "\n");
return 2;
}
@@ -440,8 +442,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read script: "
<< script.c_str()
<< std::endl);
- // Reset the error flag so that it can run more than
- // one script with an error when you
+ // Reset the error flag so that it can run more than
+ // one script with an error when you
// use ctest_run_script
cmSystemTools::ResetErrorOccuredFlag();
return 2;
@@ -880,7 +882,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
// put the initial cache into the bin dir
if (!this->InitialCache.empty())
{
- if (!this->WriteInitialCache(this->BinaryDir.c_str(),
+ if (!this->WriteInitialCache(this->BinaryDir.c_str(),
this->InitialCache.c_str()))
{
this->RestoreBackupDirectories();
@@ -986,7 +988,7 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
}
//-------------------------------------------------------------------------
-bool cmCTestScriptHandler::WriteInitialCache(const char* directory,
+bool cmCTestScriptHandler::WriteInitialCache(const char* directory,
const char* text)
{
std::string cacheFile = directory;
@@ -1032,7 +1034,7 @@ void cmCTestScriptHandler::RestoreBackupDirectories()
}
}
-bool cmCTestScriptHandler::RunScript(cmCTest* ctest, const char *sname,
+bool cmCTestScriptHandler::RunScript(cmCTest* ctest, const char *sname,
bool InProcess, int* returnValue)
{
cmCTestScriptHandler* sh = new cmCTestScriptHandler();
@@ -1076,13 +1078,13 @@ double cmCTestScriptHandler::GetRemainingTimeAllowed()
const char *timelimitS
= this->Makefile->GetDefinition("CTEST_TIME_LIMIT");
-
+
if (!timelimitS)
{
return 1.0e7;
}
double timelimit = atof(timelimitS);
-
+
return timelimit - cmSystemTools::GetTime() + this->ScriptStartTime;
}
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 9f9f85a..142bb46 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -296,7 +296,7 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix,
*this->LogFile << " Error when uploading file: "
<< local_file.c_str()
<< std::endl
- << " Error message was: "
+ << " Error message was: "
<< error_buffer << std::endl
<< " Curl output was: ";
// avoid dereference of empty vector
@@ -364,13 +364,13 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
{
if(verifyPeerOff)
{
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" Set CURLOPT_SSL_VERIFYPEER to off\n");
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
}
if(verifyHostOff)
{
- cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
+ cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" Set CURLOPT_SSL_VERIFYHOST to off\n");
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
}
@@ -601,7 +601,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix,
*this->LogFile << " Error when uploading file: "
<< local_file.c_str()
<< std::endl
- << " Error message was: " << error_buffer
+ << " Error message was: " << error_buffer
<< std::endl;
// avoid deref of begin for zero size array
if(chunk.size())
@@ -763,7 +763,7 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(
<< error_buffer << std::endl);
*this->LogFile << "\tTriggering failed with error: " << error_buffer
<< std::endl
- << " Error message was: " << error_buffer
+ << " Error message was: " << error_buffer
<< std::endl;
if(chunk.size())
{
@@ -913,8 +913,8 @@ bool cmCTestSubmitHandler::SubmitUsingCP(
{
if ( !localprefix.size() ||
!files.size() || !remoteprefix.size() || !destination.size() )
- {
- cmCTestLog(this->CTest, ERROR_MESSAGE,
+ {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
"Missing arguments for submit via cp:\n"
<< "\tlocalprefix: " << localprefix << "\n"
<< "\tNumber of files: " << files.size() << "\n"
@@ -1204,6 +1204,7 @@ int cmCTestSubmitHandler::ProcessHandler()
this->CTest->AddIfExists(cmCTest::PartMemCheck, "DynamicAnalysis.xml");
this->CTest->AddIfExists(cmCTest::PartMemCheck, "Purify.xml");
this->CTest->AddIfExists(cmCTest::PartNotes, "Notes.xml");
+ this->CTest->AddIfExists(cmCTest::PartUpload, "Upload.xml");
// Query parts for files to submit.
for(cmCTest::Part p = cmCTest::PartStart;
@@ -1285,7 +1286,7 @@ int cmCTestSubmitHandler::ProcessHandler()
<< std::endl);
ofs << " Problems when submitting via FTP" << std::endl;
return -1;
- }
+ }
if(!this->CDash)
{
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
@@ -1369,7 +1370,7 @@ int cmCTestSubmitHandler::ProcessHandler()
{
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful" <<
(this->HasWarnings ? ", with warnings." : "") << std::endl);
- ofs << " Submission successful" <<
+ ofs << " Submission successful" <<
(this->HasWarnings ? ", with warnings." : "") << std::endl;
}
@@ -1439,20 +1440,20 @@ int cmCTestSubmitHandler::ProcessHandler()
{
std::string location
= this->CTest->GetCTestConfiguration("DropLocation");
-
+
// change to the build directory so that we can uses a relative path
// on windows since scp dosn't support "c:" a drive in the path
- std::string
+ std::string
oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory();
cmSystemTools::ChangeDirectory(buildDirectory.c_str());
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Change directory: "
<< buildDirectory.c_str() << std::endl);
if ( !this->SubmitUsingCP(
- "Testing/"+this->CTest->GetCurrentTag(),
- files,
- prefix,
+ "Testing/"+this->CTest->GetCurrentTag(),
+ files,
+ prefix,
location) )
{
cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str());
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 87c75eb..bad26c5 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -108,7 +108,7 @@ bool cmCTestSubdirCommand
// does the CTestTestfile.cmake exist ?
testFilename = "CTestTestfile.cmake";
}
- else if( cmSystemTools::FileExists("DartTestfile.txt") )
+ else if( cmSystemTools::FileExists("DartTestfile.txt") )
{
// does the DartTestfile.txt exist ?
testFilename = "DartTestfile.txt";
@@ -121,7 +121,7 @@ bool cmCTestSubdirCommand
}
fname += "/";
fname += testFilename;
- bool readit =
+ bool readit =
this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(),
fname.c_str());
cmSystemTools::ChangeDirectory(cwd.c_str());
@@ -212,7 +212,7 @@ bool cmCTestAddSubdirectoryCommand
}
fname += "/";
fname += testFilename;
- bool readit =
+ bool readit =
this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(),
fname.c_str());
cmSystemTools::ChangeDirectory(cwd.c_str());
@@ -538,7 +538,7 @@ int cmCTestTestHandler::ProcessHandler()
this->UseExcludeRegExp();
this->SetExcludeRegExp(val);
}
-
+
this->TestResults.clear();
cmCTestLog(this->CTest, HANDLER_OUTPUT,
@@ -616,7 +616,7 @@ int cmCTestTestHandler::ProcessHandler()
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
<< "The following tests FAILED:" << std::endl);
this->StartLogFile("TestsFailed", ofs);
-
+
std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator ftit;
for(ftit = this->TestResults.begin();
ftit != this->TestResults.end(); ++ftit)
@@ -625,9 +625,9 @@ int cmCTestTestHandler::ProcessHandler()
{
ofs << ftit->TestCount << ":" << ftit->Name << std::endl;
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3)
- << ftit->TestCount << " - "
+ << ftit->TestCount << " - "
<< ftit->Name.c_str() << " ("
- << this->GetTestStatus(ftit->Status) << ")"
+ << this->GetTestStatus(ftit->Status) << ")"
<< std::endl);
}
}
@@ -696,18 +696,18 @@ void cmCTestTestHandler::PrintLabelSummary()
// fill maps
for(; ri != this->TestResults.end(); ++ri)
{
- cmCTestTestResult &result = *ri;
+ cmCTestTestResult &result = *ri;
cmCTestTestProperties& p = *result.Properties;
if(p.Labels.size() != 0)
{
for(std::vector<std::string>::iterator l = p.Labels.begin();
l != p.Labels.end(); ++l)
- {
+ {
labelTimes[*l] += result.ExecutionTime;
}
}
}
- // now print times
+ // now print times
if(labels.size())
{
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:");
@@ -728,7 +728,7 @@ void cmCTestTestHandler::PrintLabelSummary()
}
}
if(labels.size())
- {
+ {
if(this->LogFile)
{
*this->LogFile << "\n";
@@ -840,7 +840,7 @@ void cmCTestTestHandler::ComputeTestList()
// Now create a final list of tests to run
int cnt = 0;
inREcnt = 0;
- std::string last_directory = "";
+ std::string last_directory = "";
ListOfTests finalList;
for ( it = this->TestList.begin(); it != this->TestList.end(); it ++ )
{
@@ -888,13 +888,13 @@ void cmCTestTestHandler::ComputeTestList()
max = p.Name.size();
}
}
- if(static_cast<std::string::size_type>(this->CTest->GetMaxTestNameWidth())
+ if(static_cast<std::string::size_type>(this->CTest->GetMaxTestNameWidth())
!= max)
{
this->CTest->SetMaxTestNameWidth(static_cast<int>(max));
}
}
-
+
bool cmCTestTestHandler::GetValue(const char* tag,
int& value,
std::ifstream& fin)
@@ -984,7 +984,7 @@ bool cmCTestTestHandler::GetValue(const char* tag,
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
}
else
- {
+ {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"parse error: missing tag: "
<< tag << " found [" << line.c_str() << "]" << std::endl);
@@ -1036,7 +1036,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
cmCTestMultiProcessHandler::TestMap tests;
cmCTestMultiProcessHandler::PropertiesMap properties;
-
+
bool randomSchedule = this->CTest->GetScheduleType() == "Random";
if(randomSchedule)
{
@@ -1045,7 +1045,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<cmStdString> &passed,
for (ListOfTests::iterator it = this->TestList.begin();
it != this->TestList.end(); ++it)
- {
+ {
cmCTestTestProperties& p = *it;
cmCTestMultiProcessHandler::TestSet depends;
@@ -1158,7 +1158,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
<< result->ExecutionTime
<< "</Value></NamedMeasurement>\n";
if(result->Reason.size())
- {
+ {
const char* reasonType = "Pass Reason";
if(result->Status != cmCTestTestHandler::COMPLETED &&
result->Status != cmCTestTestHandler::NOT_RUN)
@@ -1195,7 +1195,7 @@ void cmCTestTestHandler::GenerateDartOutput(std::ostream& os)
os
<< "\t\t\t<Measurement>\n"
<< "\t\t\t\t<Value"
- << (result->CompressOutput ?
+ << (result->CompressOutput ?
" encoding=\"base64\" compression=\"gzip\">"
: ">");
os << cmXMLSafe(result->Output);
@@ -1278,11 +1278,11 @@ void cmCTestTestHandler::AttachFiles(std::ostream& os,
result->Properties->AttachOnFail.begin(),
result->Properties->AttachOnFail.end());
}
- for(std::vector<std::string>::const_iterator file =
+ for(std::vector<std::string>::const_iterator file =
result->Properties->AttachedFiles.begin();
file != result->Properties->AttachedFiles.end(); ++file)
{
- std::string base64 = this->EncodeFile(*file);
+ std::string base64 = this->CTest->Base64GzipEncodeFile(*file);
std::string fname = cmSystemTools::GetFilenameName(*file);
os << "\t\t<NamedMeasurement name=\"Attached File\" encoding=\"base64\" "
"compression=\"tar/gzip\" filename=\"" << fname << "\" type=\"file\">"
@@ -1293,48 +1293,6 @@ void cmCTestTestHandler::AttachFiles(std::ostream& os,
}
//----------------------------------------------------------------------
-std::string cmCTestTestHandler::EncodeFile(std::string file)
-{
- std::string tarFile = file + "_temp.tar.gz";
- std::vector<cmStdString> files;
- files.push_back(file);
-
- if(!cmSystemTools::CreateTar(tarFile.c_str(), files, true, false, false))
- {
- cmCTestLog(this->CTest, ERROR_MESSAGE, "Error creating tar while "
- "attaching file: " << file << std::endl);
- return "";
- }
- long len = cmSystemTools::FileLength(tarFile.c_str());
- std::ifstream ifs(tarFile.c_str(), std::ios::in
-#ifdef _WIN32
- | std::ios::binary
-#endif
- );
- unsigned char *file_buffer = new unsigned char [ len + 1 ];
- ifs.read(reinterpret_cast<char*>(file_buffer), len);
- ifs.close();
- cmSystemTools::RemoveFile(tarFile.c_str());
-
- unsigned char *encoded_buffer
- = new unsigned char [ static_cast<int>(
- static_cast<double>(len) * 1.5 + 5.0) ];
-
- unsigned long rlen
- = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
-
- std::string base64 = "";
- for(unsigned long i = 0; i < rlen; i++)
- {
- base64 += encoded_buffer[i];
- }
- delete [] file_buffer;
- delete [] encoded_buffer;
-
- return base64;
-}
-
-//----------------------------------------------------------------------
int cmCTestTestHandler::ExecuteCommands(std::vector<cmStdString>& vec)
{
std::vector<cmStdString>::iterator it;
@@ -1370,7 +1328,7 @@ std::string cmCTestTestHandler::FindTheExecutable(const char *exe)
// add additional configurations to the search path
void cmCTestTestHandler
-::AddConfigurations(cmCTest *ctest,
+::AddConfigurations(cmCTest *ctest,
std::vector<std::string> &attempted,
std::vector<std::string> &attemptedConfigs,
std::string filepath,
@@ -1378,7 +1336,7 @@ void cmCTestTestHandler
{
std::string tempPath;
- if (filepath.size() &&
+ if (filepath.size() &&
filepath[filepath.size()-1] != '/')
{
filepath += "/";
@@ -1386,7 +1344,7 @@ void cmCTestTestHandler
tempPath = filepath + filename;
attempted.push_back(tempPath);
attemptedConfigs.push_back("");
-
+
if(ctest->GetConfigType().size())
{
tempPath = filepath;
@@ -1425,7 +1383,7 @@ void cmCTestTestHandler
tempPath = filepath;
tempPath += "RelWithDebInfo/";
tempPath += filename;
- attempted.push_back(tempPath);
+ attempted.push_back(tempPath);
attemptedConfigs.push_back("RelWithDebInfo");
tempPath = filepath;
tempPath += "Deployment/";
@@ -1472,8 +1430,8 @@ std::string cmCTestTestHandler
attemptedConfigs,
localfilepath,filename);
}
-
-
+
+
// if extraPaths are provided and we were not passed a full path, try them,
// try any extra paths
if (filepath.size() == 0)
@@ -1489,8 +1447,8 @@ std::string cmCTestTestHandler
filepathExtra,
filenameExtra);
}
- }
-
+ }
+
// store the final location in fullPath
std::string fullPath;
@@ -1523,7 +1481,7 @@ std::string cmCTestTestHandler
}
}
}
-
+
// if everything else failed, check the users path, but only if a full path
// wasn't specified
if (fullPath.size() == 0 && filepath.size() == 0)
@@ -1547,7 +1505,7 @@ std::string cmCTestTestHandler
i->c_str() << "\n");
}
}
-
+
return fullPath;
}
@@ -1589,13 +1547,13 @@ void cmCTestTestHandler::GetListOfTests()
cm.AddCommand(newCom1);
// Add handler for SUBDIRS
- cmCTestSubdirCommand* newCom2 =
+ cmCTestSubdirCommand* newCom2 =
new cmCTestSubdirCommand;
newCom2->TestHandler = this;
cm.AddCommand(newCom2);
// Add handler for ADD_SUBDIRECTORY
- cmCTestAddSubdirectoryCommand* newCom3 =
+ cmCTestAddSubdirectoryCommand* newCom3 =
new cmCTestAddSubdirectoryCommand;
newCom3->TestHandler = this;
cm.AddCommand(newCom3);
@@ -2156,7 +2114,7 @@ bool cmCTestTestHandler::SetTestsProperties(
}
}
if ( key == "ENVIRONMENT" )
- {
+ {
std::vector<std::string> lval;
cmSystemTools::ExpandListArgument(val.c_str(), lval);
std::vector<std::string>::iterator crit;
@@ -2272,7 +2230,7 @@ bool cmCTestTestHandler::AddTest(const std::vector<std::string>& args)
test.Directory = cmSystemTools::GetCurrentWorkingDirectory();
cmCTestLog(this->CTest, DEBUG, "Set test directory: "
<< test.Directory << std::endl);
-
+
test.IsInBasedOnREOptions = true;
test.WillFail = false;
test.RunSerial = false;
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 7aa8522..3089d35 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -126,7 +126,7 @@ public:
};
// add configuraitons to a search path for an executable
- static void AddConfigurations(cmCTest *ctest,
+ static void AddConfigurations(cmCTest *ctest,
std::vector<std::string> &attempted,
std::vector<std::string> &attemptedConfigs,
std::string filepath,
@@ -151,8 +151,6 @@ protected:
void WriteTestResultFooter(std::ostream& os, cmCTestTestResult* result);
// Write attached test files into the xml
void AttachFiles(std::ostream& os, cmCTestTestResult* result);
- // Helper function to encode attached test files
- std::string EncodeFile(std::string file);
//! Clean test output to specified length
bool CleanTestOutput(std::string& output, size_t length);
@@ -205,7 +203,7 @@ private:
// compute the lists of tests that will actually run
// based on union regex and -I stuff
void ComputeTestList();
-
+
bool GetValue(const char* tag,
std::string& value,
std::ifstream& fin);
diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx
new file mode 100644
index 0000000..9f0954b
--- /dev/null
+++ b/Source/CTest/cmCTestUploadCommand.cxx
@@ -0,0 +1,57 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmCTestUploadCommand.h"
+
+#include "cmCTest.h"
+#include "cmCTestGenericHandler.h"
+#include "cmCTestUploadHandler.h"
+
+cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler()
+{
+ cmCTestGenericHandler* handler
+ = this->CTest->GetInitializedHandler("upload");
+ if ( !handler )
+ {
+ this->SetError("internal CTest error. Cannot instantiate upload handler");
+ return 0;
+ }
+ static_cast<cmCTestUploadHandler*>(handler)->SetFiles(this->Files);
+
+ return handler;
+}
+
+
+//----------------------------------------------------------------------------
+bool cmCTestUploadCommand::CheckArgumentKeyword(std::string const& arg)
+{
+ return this->CheckArgumentValue(arg);
+}
+
+
+//----------------------------------------------------------------------------
+bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg)
+{
+ cmStdString filename(arg);
+ if(cmSystemTools::FileExists(filename.c_str()))
+ {
+ this->Files.insert(filename);
+ return true;
+ }
+ else
+ {
+ cmOStringStream e;
+ e << "File \"" << filename << "\" does not exist. Cannot submit "
+ << "a non-existent file.";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ return false;
+ }
+}
diff --git a/Source/CTest/cmCTestUploadCommand.h b/Source/CTest/cmCTestUploadCommand.h
new file mode 100644
index 0000000..b8c9d9f
--- /dev/null
+++ b/Source/CTest/cmCTestUploadCommand.h
@@ -0,0 +1,79 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmCTestUploadCommand_h
+#define cmCTestUploadCommand_h
+
+#include "cmCTestHandlerCommand.h"
+#include "cmCTest.h"
+
+/** \class cmCTestUpload
+ * \brief Run a ctest script
+ *
+ * cmCTestUploadCommand defines the command to upload result files for
+ * the project.
+ */
+class cmCTestUploadCommand : public cmCTestHandlerCommand
+{
+public:
+
+ cmCTestUploadCommand()
+ {
+ }
+
+ /**
+ * This is a virtual constructor for the command.
+ */
+ virtual cmCommand* Clone()
+ {
+ cmCTestUploadCommand* ni = new cmCTestUploadCommand;
+ ni->CTest = this->CTest;
+ ni->CTestScriptHandler = this->CTestScriptHandler;
+ return ni;
+ }
+
+ /**
+ * The name of the command as specified in CMakeList.txt.
+ */
+ virtual const char* GetName() { return "ctest_upload";}
+
+ /**
+ * Succinct documentation.
+ */
+ virtual const char* GetTerseDocumentation()
+ {
+ return "Upload files to a dashboard server.";
+ }
+
+ /**
+ * More documentation.
+ */
+ virtual const char* GetFullDocumentation()
+ {
+ return
+ " ctest_upload(...)\n"
+ "Pass a list of files to be sent along with the build results to "
+ "the dashboard server.\n";
+ }
+
+ cmTypeMacro(cmCTestUploadCommand, cmCTestHandlerCommand);
+
+protected:
+ cmCTestGenericHandler* InitializeHandler();
+
+ virtual bool CheckArgumentKeyword(std::string const& arg);
+ virtual bool CheckArgumentValue(std::string const& arg);
+
+ cmCTest::SetOfStrings Files;
+};
+
+
+#endif
diff --git a/Source/CTest/cmCTestUploadHandler.cxx b/Source/CTest/cmCTestUploadHandler.cxx
new file mode 100644
index 0000000..d5f6ab6
--- /dev/null
+++ b/Source/CTest/cmCTestUploadHandler.cxx
@@ -0,0 +1,77 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc.
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#include "cmCTestUploadHandler.h"
+
+#include "cmGeneratedFileStream.h"
+#include "cmVersion.h"
+#include "cmXMLSafe.h"
+
+//----------------------------------------------------------------------------
+cmCTestUploadHandler::cmCTestUploadHandler()
+{
+ this->Initialize();
+}
+
+//----------------------------------------------------------------------------
+void cmCTestUploadHandler::Initialize()
+{
+ this->Superclass::Initialize();
+ this->Files.clear();
+}
+
+void cmCTestUploadHandler::SetFiles(const cmCTest::SetOfStrings& files)
+{
+ this->Files = files;
+}
+
+//----------------------------------------------------------------------------
+int cmCTestUploadHandler::ProcessHandler()
+{
+ cmGeneratedFileStream ofs;
+ if ( !this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(),
+ "Upload.xml", ofs))
+ {
+ cmCTestLog(this->CTest, ERROR_MESSAGE,
+ "Cannot open Upload.xml file" << std::endl);
+ return -1;
+ }
+
+ cmCTest::SetOfStrings::const_iterator it;
+ ofs << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ << "<?xml-stylesheet type=\"text/xsl\" "
+ "href=\"Dart/Source/Server/XSL/Build.xsl "
+ "<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
+ << "<Site BuildName=\""
+ << this->CTest->GetCTestConfiguration("BuildName")
+ << "\" BuildStamp=\""
+ << this->CTest->GetCurrentTag() << "-"
+ << this->CTest->GetTestModelString() << "\" Name=\""
+ << this->CTest->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
+ << cmVersion::GetCMakeVersion()
+ << "\">\n";
+ this->CTest->AddSiteProperties(ofs);
+ ofs << "<Files>\n";
+
+ for ( it = this->Files.begin(); it != this->Files.end(); it ++ )
+ {
+ cmCTestLog(this->CTest, OUTPUT,
+ "\tUpload file: " << it->c_str() << std::endl);
+ ofs << "<File filename=\"" << cmXMLSafe(*it) << "\">\n"
+ << "<Content compression=\"tar/gzip\" encoding=\"base64\">\n";
+ ofs << this->CTest->Base64GzipEncodeFile(*it);
+ ofs << "\n</Content>\n"
+ << "</File>\n";
+ }
+ ofs << "</Files>\n"
+ << "</Site>\n";
+ return 0;
+}
diff --git a/Source/CTest/cmCTestUploadHandler.h b/Source/CTest/cmCTestUploadHandler.h
new file mode 100644
index 0000000..23ed35a
--- /dev/null
+++ b/Source/CTest/cmCTestUploadHandler.h
@@ -0,0 +1,45 @@
+/*============================================================================
+ CMake - Cross Platform Makefile Generator
+ Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
+
+ Distributed under the OSI-approved BSD License (the "License");
+ see accompanying file Copyright.txt for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even the
+ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License for more information.
+============================================================================*/
+#ifndef cmCTestUploadHandler_h
+#define cmCTestUploadHandler_h
+
+#include "cmCTestGenericHandler.h"
+
+/** \class cmCTestUploadHandler
+ * \brief Helper class for CTest
+ *
+ * Submit arbitrary files
+ *
+ */
+class cmCTestUploadHandler : public cmCTestGenericHandler
+{
+public:
+ cmTypeMacro(cmCTestUploadHandler, cmCTestGenericHandler);
+
+ cmCTestUploadHandler();
+ ~cmCTestUploadHandler() {}
+
+ /*
+ * The main entry point for this class
+ */
+ int ProcessHandler();
+
+ void Initialize();
+
+ /** Specify a set of files to submit. */
+ void SetFiles(cmCTest::SetOfStrings const& files);
+
+private:
+ cmCTest::SetOfStrings Files;
+};
+
+#endif
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 2e05883..5827167 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -16,6 +16,7 @@
#include "cmMakefile.h"
#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
+#include <cmsys/Base64.h>
#include <cmsys/Directory.hxx>
#include <cmsys/SystemInformation.hxx>
#include "cmDynamicLoader.h"
@@ -31,9 +32,10 @@
#include "cmCTestCoverageHandler.h"
#include "cmCTestMemCheckHandler.h"
#include "cmCTestScriptHandler.h"
+#include "cmCTestSubmitHandler.h"
#include "cmCTestTestHandler.h"
#include "cmCTestUpdateHandler.h"
-#include "cmCTestSubmitHandler.h"
+#include "cmCTestUploadHandler.h"
#include "cmVersion.h"
@@ -339,6 +341,7 @@ cmCTest::cmCTest()
this->Parts[PartSubmit].SetName("Submit");
this->Parts[PartNotes].SetName("Notes");
this->Parts[PartExtraFiles].SetName("ExtraFiles");
+ this->Parts[PartUpload].SetName("Upload");
// Fill the part name-to-id map.
for(Part p = PartStart; p != PartCount; p = Part(p+1))
@@ -357,6 +360,7 @@ cmCTest::cmCTest()
this->TestingHandlers["configure"] = new cmCTestConfigureHandler;
this->TestingHandlers["memcheck"] = new cmCTestMemCheckHandler;
this->TestingHandlers["submit"] = new cmCTestSubmitHandler;
+ this->TestingHandlers["upload"] = new cmCTestUploadHandler;
cmCTest::t_TestingHandlers::iterator it;
for ( it = this->TestingHandlers.begin();
@@ -1584,6 +1588,48 @@ int cmCTest::GenerateNotesFile(const char* cfiles)
}
//----------------------------------------------------------------------
+std::string cmCTest::Base64GzipEncodeFile(std::string file)
+{
+ std::string tarFile = file + "_temp.tar.gz";
+ std::vector<cmStdString> files;
+ files.push_back(file);
+
+ if(!cmSystemTools::CreateTar(tarFile.c_str(), files, true, false, false))
+ {
+ cmCTestLog(this, ERROR_MESSAGE, "Error creating tar while "
+ "encoding file: " << file << std::endl);
+ return "";
+ }
+ long len = cmSystemTools::FileLength(tarFile.c_str());
+ std::ifstream ifs(tarFile.c_str(), std::ios::in
+#ifdef _WIN32
+ | std::ios::binary
+#endif
+ );
+ unsigned char *file_buffer = new unsigned char [ len + 1 ];
+ ifs.read(reinterpret_cast<char*>(file_buffer), len);
+ ifs.close();
+ cmSystemTools::RemoveFile(tarFile.c_str());
+
+ unsigned char *encoded_buffer
+ = new unsigned char [ static_cast<int>(
+ static_cast<double>(len) * 1.5 + 5.0) ];
+
+ unsigned long rlen
+ = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
+
+ std::string base64 = "";
+ for(unsigned long i = 0; i < rlen; i++)
+ {
+ base64 += encoded_buffer[i];
+ }
+ delete [] file_buffer;
+ delete [] encoded_buffer;
+
+ return base64;
+}
+
+//----------------------------------------------------------------------
bool cmCTest::SubmitExtraFiles(const std::vector<cmStdString> &files)
{
std::vector<cmStdString>::const_iterator it;
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index e54a205..4bd628f 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -61,6 +61,7 @@ public:
PartSubmit,
PartNotes,
PartExtraFiles,
+ PartUpload,
PartCount // Update names in constructor when adding a part
};
@@ -192,8 +193,11 @@ public:
///! Get the current time as string
std::string CurrentTime();
+ //! tar/gzip and then base 64 encode a file
+ std::string Base64GzipEncodeFile(std::string file);
+
/**
- * Return the time remaianing that the script is allowed to run in
+ * Return the time remaining that the script is allowed to run in
* seconds if the user has set the variable CTEST_TIME_LIMIT. If that has
* not been set it returns 1e7 seconds
*/
@@ -515,7 +519,7 @@ private:
//! Reread the configuration file
bool UpdateCTestConfiguration();
- //! Create not from files.
+ //! Create note from files.
int GenerateCTestNotesOutput(std::ostream& os,
const VectorOfStrings& files);
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2c11919..05454db 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -815,11 +815,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--test-command ${CMAKE_CTEST_COMMAND} -V
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ExternalProject")
- # The ExternalProject test takes 900 seconds on some machines!
- GET_TEST_PROPERTY(ExternalProject TIMEOUT PREVIOUS_TIMEOUT)
- IF("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- SET_TESTS_PROPERTIES(ExternalProject PROPERTIES TIMEOUT 1000)
- ENDIF("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
+ SET_TESTS_PROPERTIES(ExternalProject PROPERTIES
+ TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
# do each of the tutorial steps
FOREACH(STP RANGE 1 7)
@@ -1144,6 +1141,21 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
+ ADD_TEST(CFBundleTest ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/CFBundleTest"
+ "${CMake_BINARY_DIR}/Tests/CFBundleTest"
+ --build-two-config
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project CFBundleTest
+ --test-command
+ ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE}
+ -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest
+ -Dgen=${CMAKE_TEST_GENERATOR}
+ -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake)
+ LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest")
+
ADD_TEST_MACRO(ObjC++ ObjC++)
ENDIF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
@@ -1400,6 +1412,16 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
PASS_REGULAR_EXPRESSION "Could not find executable"
FAIL_REGULAR_EXPRESSION "SegFault")
+ CONFIGURE_FILE(
+ "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in"
+ "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake"
+ @ONLY ESCAPE_QUOTES)
+ ADD_TEST(CTestTestUpload ${CMAKE_CTEST_COMMAND}
+ -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V
+ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log"
+ )
+ SET_TESTS_PROPERTIES(CTestTestUpload PROPERTIES
+ PASS_REGULAR_EXPRESSION "Upload\\.xml")
# Use macro, not function so that build can still be driven by CMake 2.4.
# After 2.6 is required, this could be a function without the extra 'set'
diff --git a/Tests/CTestTestUpload/CMakeLists.txt b/Tests/CTestTestUpload/CMakeLists.txt
new file mode 100644
index 0000000..bc164b1
--- /dev/null
+++ b/Tests/CTestTestUpload/CMakeLists.txt
@@ -0,0 +1,4 @@
+cmake_minimum_required (VERSION 2.6)
+PROJECT(CTestTestUpload)
+
+add_executable (Sleep sleep.c)
diff --git a/Tests/CTestTestUpload/CTestConfig.cmake b/Tests/CTestTestUpload/CTestConfig.cmake
new file mode 100644
index 0000000..89c5b94
--- /dev/null
+++ b/Tests/CTestTestUpload/CTestConfig.cmake
@@ -0,0 +1,7 @@
+set (CTEST_PROJECT_NAME "CTestTestUpload")
+set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
+set (CTEST_DART_SERVER_VERSION "2")
+set (CTEST_DROP_METHOD "http")
+set (CTEST_DROP_SITE "www.cdash.org")
+set (CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
+set (CTEST_DROP_SITE_CDASH TRUE)
diff --git a/Tests/CTestTestUpload/sleep.c b/Tests/CTestTestUpload/sleep.c
new file mode 100644
index 0000000..b589647
--- /dev/null
+++ b/Tests/CTestTestUpload/sleep.c
@@ -0,0 +1,21 @@
+#if defined(_WIN32)
+# include <windows.h>
+#else
+# include <unistd.h>
+#endif
+
+/* sleeps for n seconds, where n is the argument to the program */
+int main(int argc, char** argv)
+{
+ int time;
+ if(argc > 1)
+ {
+ time = atoi(argv[1]);
+ }
+#if defined(_WIN32)
+ Sleep(time * 1000);
+#else
+ sleep(time);
+#endif
+ return 0;
+}
diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in
new file mode 100644
index 0000000..2ab98d7
--- /dev/null
+++ b/Tests/CTestTestUpload/test.cmake.in
@@ -0,0 +1,17 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.1)
+
+# Settings:
+SET(CTEST_DASHBOARD_ROOT "@CMake_BINARY_DIR@/Tests/CTestTest")
+SET(CTEST_SITE "@SITE@")
+SET(CTEST_BUILD_NAME "CTestTest- at BUILDNAME@-Upload")
+
+SET(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestUpload")
+SET(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestUpload")
+SET(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
+SET(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
+
+CTEST_START(Experimental)
+CTEST_CONFIGURE(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_SUBMIT()
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeLists.txt | 2 +
Source/CTest/cmCTestScriptHandler.cxx | 42 ++++----
Source/CTest/cmCTestSubmitHandler.cxx | 29 +++---
Source/CTest/cmCTestTestHandler.cxx | 112 ++++++--------------
Source/CTest/cmCTestTestHandler.h | 6 +-
Source/CTest/cmCTestUploadCommand.cxx | 57 ++++++++++
...CTestUpdateCommand.h => cmCTestUploadCommand.h} | 38 ++++---
Source/CTest/cmCTestUploadHandler.cxx | 77 ++++++++++++++
...stConfigureHandler.h => cmCTestUploadHandler.h} | 30 +++--
Source/cmCTest.cxx | 48 ++++++++-
Source/cmCTest.h | 8 +-
Tests/CMakeLists.txt | 10 ++
Tests/CTestTestUpload/CMakeLists.txt | 4 +
Tests/CTestTestUpload/CTestConfig.cmake | 7 ++
.../{CTestTestStopTime => CTestTestUpload}/sleep.c | 0
.../test.cmake.in | 12 +--
16 files changed, 329 insertions(+), 153 deletions(-)
create mode 100644 Source/CTest/cmCTestUploadCommand.cxx
copy Source/CTest/{cmCTestUpdateCommand.h => cmCTestUploadCommand.h} (58%)
create mode 100644 Source/CTest/cmCTestUploadHandler.cxx
copy Source/CTest/{cmCTestConfigureHandler.h => cmCTestUploadHandler.h} (55%)
create mode 100644 Tests/CTestTestUpload/CMakeLists.txt
create mode 100644 Tests/CTestTestUpload/CTestConfig.cmake
copy Tests/{CTestTestStopTime => CTestTestUpload}/sleep.c (100%)
copy Tests/{CTestTestCycle => CTestTestUpload}/test.cmake.in (61%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list