ENH: Cleanups

This commit is contained in:
Andy Cedilnik 2005-05-03 09:40:16 -04:00
parent c7feef30e2
commit de57a86298
14 changed files with 108 additions and 108 deletions

View File

@ -33,7 +33,7 @@ bool cmCTestBuildCommand::InitialPass(
const char* build_dir = args[0].c_str(); const char* build_dir = args[0].c_str();
const char* res_var = args[1].c_str(); const char* res_var = args[1].c_str();
m_CTest->SetDartConfiguration("BuildDirectory", build_dir); m_CTest->SetCTestConfiguration("BuildDirectory", build_dir);
cmCTestGenericHandler* handler = m_CTest->GetHandler("build"); cmCTestGenericHandler* handler = m_CTest->GetHandler("build");
if ( !handler ) if ( !handler )
{ {
@ -44,7 +44,7 @@ bool cmCTestBuildCommand::InitialPass(
const char* ctestBuildCommand = m_Makefile->GetDefinition("CTEST_BUILD_COMMAND"); const char* ctestBuildCommand = m_Makefile->GetDefinition("CTEST_BUILD_COMMAND");
if ( ctestBuildCommand && *ctestBuildCommand ) if ( ctestBuildCommand && *ctestBuildCommand )
{ {
m_CTest->SetDartConfiguration("MakeCommand", ctestBuildCommand); m_CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand);
} }
else else
{ {
@ -66,7 +66,7 @@ bool cmCTestBuildCommand::InitialPass(
std::string buildCommand = gen->GenerateBuildCommand(cmakeMakeProgram, cmakeProjectName, std::string buildCommand = gen->GenerateBuildCommand(cmakeMakeProgram, cmakeProjectName,
0, cmakeBuildConfiguration, true); 0, cmakeBuildConfiguration, true);
m_CTest->SetDartConfiguration("MakeCommand", buildCommand.c_str()); m_CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str());
} }
else else
{ {

View File

@ -197,13 +197,13 @@ void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile *mf)
int cmCTestBuildHandler::ProcessHandler() int cmCTestBuildHandler::ProcessHandler()
{ {
std::cout << "Build project" << std::endl; std::cout << "Build project" << std::endl;
const std::string &makeCommand = m_CTest->GetDartConfiguration("MakeCommand"); const std::string &makeCommand = m_CTest->GetCTestConfiguration("MakeCommand");
if ( makeCommand.size() == 0 ) if ( makeCommand.size() == 0 )
{ {
std::cerr << "Cannot find MakeCommand key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find MakeCommand key in the DartConfiguration.tcl" << std::endl;
return -1; return -1;
} }
const std::string &buildDirectory = m_CTest->GetDartConfiguration("BuildDirectory"); const std::string &buildDirectory = m_CTest->GetCTestConfiguration("BuildDirectory");
if ( buildDirectory.size() == 0 ) if ( buildDirectory.size() == 0 )
{ {
std::cerr << "Cannot find BuildDirectory key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find BuildDirectory key in the DartConfiguration.tcl" << std::endl;
@ -239,11 +239,11 @@ int cmCTestBuildHandler::ProcessHandler()
} }
std::vector<cmStdString>::size_type cc; std::vector<cmStdString>::size_type cc;
if ( m_CTest->GetDartConfiguration("SourceDirectory").size() > 20 || if ( m_CTest->GetCTestConfiguration("SourceDirectory").size() > 20 ||
m_CTest->GetDartConfiguration("BuildDirectory").size() > 20 ) m_CTest->GetCTestConfiguration("BuildDirectory").size() > 20 )
{ {
std::string srcdir = m_CTest->GetDartConfiguration("SourceDirectory") + "/"; std::string srcdir = m_CTest->GetCTestConfiguration("SourceDirectory") + "/";
std::string bindir = m_CTest->GetDartConfiguration("BuildDirectory") + "/"; std::string bindir = m_CTest->GetCTestConfiguration("BuildDirectory") + "/";
std::string srcdirrep; std::string srcdirrep;
std::string bindirrep; std::string bindirrep;
for ( cc = srcdir.size()-2; cc > 0; cc -- ) for ( cc = srcdir.size()-2; cc > 0; cc -- )
@ -456,7 +456,7 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
os << "<Build>\n" os << "<Build>\n"
<< "\t<StartDateTime>" << m_StartBuild << "</StartDateTime>\n" << "\t<StartDateTime>" << m_StartBuild << "</StartDateTime>\n"
<< "<BuildCommand>" << "<BuildCommand>"
<< m_CTest->MakeXMLSafe(m_CTest->GetDartConfiguration("MakeCommand")) << m_CTest->MakeXMLSafe(m_CTest->GetCTestConfiguration("MakeCommand"))
<< "</BuildCommand>" << std::endl; << "</BuildCommand>" << std::endl;
std::vector<cmCTestBuildErrorWarning>::iterator it; std::vector<cmCTestBuildErrorWarning>::iterator it;
@ -464,7 +464,7 @@ void cmCTestBuildHandler::GenerateDartBuildOutput(
// only report the first 50 warnings and first 50 errors // only report the first 50 warnings and first 50 errors
unsigned short numErrorsAllowed = 50; unsigned short numErrorsAllowed = 50;
unsigned short numWarningsAllowed = 50; unsigned short numWarningsAllowed = 50;
std::string srcdir = m_CTest->GetDartConfiguration("SourceDirectory"); std::string srcdir = m_CTest->GetCTestConfiguration("SourceDirectory");
// make sure the source dir is in the correct case on windows // make sure the source dir is in the correct case on windows
// via a call to collapse full path. // via a call to collapse full path.
srcdir = cmSystemTools::CollapseFullPath(srcdir.c_str()); srcdir = cmSystemTools::CollapseFullPath(srcdir.c_str());

View File

@ -31,8 +31,8 @@ bool cmCTestConfigureCommand::InitialPass(
const char* build_dir = args[0].c_str(); const char* build_dir = args[0].c_str();
const char* res_var = args[1].c_str(); const char* res_var = args[1].c_str();
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "ConfigureCommand", "CTEST_CONFIGURE_COMMAND"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "ConfigureCommand", "CTEST_CONFIGURE_COMMAND");
m_CTest->SetDartConfiguration("BuildDirectory", build_dir); m_CTest->SetCTestConfiguration("BuildDirectory", build_dir);
cmCTestGenericHandler* handler = m_CTest->GetHandler("configure"); cmCTestGenericHandler* handler = m_CTest->GetHandler("configure");
if ( !handler ) if ( !handler )

View File

@ -37,7 +37,7 @@ cmCTestConfigureHandler::cmCTestConfigureHandler()
int cmCTestConfigureHandler::ProcessHandler() int cmCTestConfigureHandler::ProcessHandler()
{ {
std::cout << "Configure project" << std::endl; std::cout << "Configure project" << std::endl;
std::string cCommand = m_CTest->GetDartConfiguration("ConfigureCommand"); std::string cCommand = m_CTest->GetCTestConfiguration("ConfigureCommand");
if ( cCommand.size() == 0 ) if ( cCommand.size() == 0 )
{ {
std::cerr << "Cannot find ConfigureCommand key in the DartConfiguration.tcl" std::cerr << "Cannot find ConfigureCommand key in the DartConfiguration.tcl"
@ -45,7 +45,7 @@ int cmCTestConfigureHandler::ProcessHandler()
return -1; return -1;
} }
std::string buildDirectory = m_CTest->GetDartConfiguration("BuildDirectory"); std::string buildDirectory = m_CTest->GetCTestConfiguration("BuildDirectory");
if ( buildDirectory.size() == 0 ) if ( buildDirectory.size() == 0 )
{ {
std::cerr << "Cannot find BuildDirectory key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find BuildDirectory key in the DartConfiguration.tcl" << std::endl;

View File

@ -158,9 +158,9 @@ int cmCTestCoverageHandler::ProcessHandler()
{ {
int error = 0; int error = 0;
std::string sourceDir = m_CTest->GetDartConfiguration("SourceDirectory"); std::string sourceDir = m_CTest->GetCTestConfiguration("SourceDirectory");
std::string binaryDir = m_CTest->GetDartConfiguration("BuildDirectory"); std::string binaryDir = m_CTest->GetCTestConfiguration("BuildDirectory");
std::string gcovCommand = m_CTest->GetDartConfiguration("CoverageCommand"); std::string gcovCommand = m_CTest->GetCTestConfiguration("CoverageCommand");
cmSystemTools::ConvertToUnixSlashes(sourceDir); cmSystemTools::ConvertToUnixSlashes(sourceDir);
cmSystemTools::ConvertToUnixSlashes(binaryDir); cmSystemTools::ConvertToUnixSlashes(binaryDir);

View File

@ -279,20 +279,20 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os)
bool cmCTestMemCheckHandler::InitializeMemoryChecking() bool cmCTestMemCheckHandler::InitializeMemoryChecking()
{ {
// Setup the command // Setup the command
if ( cmSystemTools::FileExists(m_CTest->GetDartConfiguration("MemoryCheckCommand").c_str()) ) if ( cmSystemTools::FileExists(m_CTest->GetCTestConfiguration("MemoryCheckCommand").c_str()) )
{ {
m_MemoryTester m_MemoryTester
= cmSystemTools::ConvertToOutputPath(m_CTest->GetDartConfiguration("MemoryCheckCommand").c_str()); = cmSystemTools::ConvertToOutputPath(m_CTest->GetCTestConfiguration("MemoryCheckCommand").c_str());
} }
else if ( cmSystemTools::FileExists(m_CTest->GetDartConfiguration("PurifyCommand").c_str()) ) else if ( cmSystemTools::FileExists(m_CTest->GetCTestConfiguration("PurifyCommand").c_str()) )
{ {
m_MemoryTester m_MemoryTester
= cmSystemTools::ConvertToOutputPath(m_CTest->GetDartConfiguration("PurifyCommand").c_str()); = cmSystemTools::ConvertToOutputPath(m_CTest->GetCTestConfiguration("PurifyCommand").c_str());
} }
else if ( cmSystemTools::FileExists(m_CTest->GetDartConfiguration("ValgrindCommand").c_str()) ) else if ( cmSystemTools::FileExists(m_CTest->GetCTestConfiguration("ValgrindCommand").c_str()) )
{ {
m_MemoryTester m_MemoryTester
= cmSystemTools::ConvertToOutputPath(m_CTest->GetDartConfiguration("ValgrindCommand").c_str()); = cmSystemTools::ConvertToOutputPath(m_CTest->GetCTestConfiguration("ValgrindCommand").c_str());
} }
else else
{ {
@ -307,13 +307,13 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
} }
// Setup the options // Setup the options
if ( m_CTest->GetDartConfiguration("MemoryCheckCommandOptions").size() ) if ( m_CTest->GetCTestConfiguration("MemoryCheckCommandOptions").size() )
{ {
m_MemoryTesterOptions = m_CTest->GetDartConfiguration("MemoryCheckCommandOptions"); m_MemoryTesterOptions = m_CTest->GetCTestConfiguration("MemoryCheckCommandOptions");
} }
else if ( m_CTest->GetDartConfiguration("ValgrindCommandOptions").size() ) else if ( m_CTest->GetCTestConfiguration("ValgrindCommandOptions").size() )
{ {
m_MemoryTesterOptions = m_CTest->GetDartConfiguration("ValgrindCommandOptions"); m_MemoryTesterOptions = m_CTest->GetCTestConfiguration("ValgrindCommandOptions");
} }
m_MemoryTesterOutputFile = m_CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.log"; m_MemoryTesterOutputFile = m_CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.log";
@ -326,15 +326,15 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
{ {
m_MemoryTesterOptions = "-q --skin=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=100"; m_MemoryTesterOptions = "-q --skin=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=100";
} }
if ( m_CTest->GetDartConfiguration("MemoryCheckSuppressionFile").size() ) if ( m_CTest->GetCTestConfiguration("MemoryCheckSuppressionFile").size() )
{ {
if ( !cmSystemTools::FileExists(m_CTest->GetDartConfiguration("MemoryCheckSuppressionFile").c_str()) ) if ( !cmSystemTools::FileExists(m_CTest->GetCTestConfiguration("MemoryCheckSuppressionFile").c_str()) )
{ {
std::cerr << "Cannot find memory checker suppression file: " std::cerr << "Cannot find memory checker suppression file: "
<< m_CTest->GetDartConfiguration("MemoryCheckSuppressionFile").c_str() << std::endl; << m_CTest->GetCTestConfiguration("MemoryCheckSuppressionFile").c_str() << std::endl;
return false; return false;
} }
m_MemoryTesterOptions += " --suppressions=" + cmSystemTools::EscapeSpaces(m_CTest->GetDartConfiguration("MemoryCheckSuppressionFile").c_str()) + ""; m_MemoryTesterOptions += " --suppressions=" + cmSystemTools::EscapeSpaces(m_CTest->GetCTestConfiguration("MemoryCheckSuppressionFile").c_str()) + "";
} }
} }
else if ( m_MemoryTester.find("purify") != std::string::npos ) else if ( m_MemoryTester.find("purify") != std::string::npos )

View File

@ -84,9 +84,9 @@ bool cmCTestStartCommand::InitialPass(
} }
} }
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "NightlyStartTime", "CTEST_NIGHTLY_START_TIME"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "NightlyStartTime", "CTEST_NIGHTLY_START_TIME");
m_CTest->SetDartConfiguration("SourceDirectory", src_dir); m_CTest->SetCTestConfiguration("SourceDirectory", src_dir);
m_CTest->SetDartConfiguration("BuildDirectory", bld_dir); m_CTest->SetCTestConfiguration("BuildDirectory", bld_dir);
int model = m_CTest->GetTestModelFromString(smodel); int model = m_CTest->GetTestModelFromString(smodel);
m_CTest->SetTestModel(model); m_CTest->SetTestModel(model);

View File

@ -30,13 +30,13 @@ bool cmCTestSubmitCommand::InitialPass(
const char* res_var = args[0].c_str(); const char* res_var = args[0].c_str();
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "DropMethod", "CTEST_DROP_METHOD"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "DropMethod", "CTEST_DROP_METHOD");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "DropSite", "CTEST_DROP_SITE"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "DropSite", "CTEST_DROP_SITE");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "DropLocation", "CTEST_DROP_LOCATION"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "DropLocation", "CTEST_DROP_LOCATION");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "DropSiteUser", "CTEST_DROP_SITE_USER"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "DropSiteUser", "CTEST_DROP_SITE_USER");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "DropSitePassword", "CTEST_DROP_SITE_PASSWORD");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "TriggerSite", "CTEST_TRIGGER_SITE"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "TriggerSite", "CTEST_TRIGGER_SITE");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "ScpCommand", "CTEST_SCP_COMMAND"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "ScpCommand", "CTEST_SCP_COMMAND");
cmCTestGenericHandler* handler = m_CTest->GetHandler("submit"); cmCTestGenericHandler* handler = m_CTest->GetHandler("submit");
if ( !handler ) if ( !handler )

View File

@ -645,7 +645,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix,
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int cmCTestSubmitHandler::ProcessHandler() int cmCTestSubmitHandler::ProcessHandler()
{ {
const std::string &buildDirectory = m_CTest->GetDartConfiguration("BuildDirectory"); const std::string &buildDirectory = m_CTest->GetCTestConfiguration("BuildDirectory");
if ( buildDirectory.size() == 0 ) if ( buildDirectory.size() == 0 )
{ {
std::cerr << "Cannot find BuildDirectory key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find BuildDirectory key in the DartConfiguration.tcl" << std::endl;
@ -700,19 +700,19 @@ int cmCTestSubmitHandler::ProcessHandler()
cnt ++; cnt ++;
} }
} }
std::cout << "Submit files (using " << m_CTest->GetDartConfiguration("DropMethod") << ")" std::cout << "Submit files (using " << m_CTest->GetCTestConfiguration("DropMethod") << ")"
<< std::endl; << std::endl;
this->SetLogFile(&ofs); this->SetLogFile(&ofs);
if ( m_CTest->GetDartConfiguration("DropMethod") == "" || if ( m_CTest->GetCTestConfiguration("DropMethod") == "" ||
m_CTest->GetDartConfiguration("DropMethod") == "ftp" ) m_CTest->GetCTestConfiguration("DropMethod") == "ftp" )
{ {
ofs << "Using drop method: FTP" << std::endl; ofs << "Using drop method: FTP" << std::endl;
std::cout << " Using FTP submit method" << std::endl; std::cout << " Using FTP submit method" << std::endl;
std::string url = "ftp://"; std::string url = "ftp://";
url += cmCTest::MakeURLSafe(m_CTest->GetDartConfiguration("DropSiteUser")) + ":" + url += cmCTest::MakeURLSafe(m_CTest->GetCTestConfiguration("DropSiteUser")) + ":" +
cmCTest::MakeURLSafe(m_CTest->GetDartConfiguration("DropSitePassword")) + "@" + cmCTest::MakeURLSafe(m_CTest->GetCTestConfiguration("DropSitePassword")) + "@" +
m_CTest->GetDartConfiguration("DropSite") + m_CTest->GetCTestConfiguration("DropSite") +
cmCTest::MakeURLSafe(m_CTest->GetDartConfiguration("DropLocation")); cmCTest::MakeURLSafe(m_CTest->GetCTestConfiguration("DropLocation"));
if ( !this->SubmitUsingFTP(buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), if ( !this->SubmitUsingFTP(buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(),
files, prefix, url) ) files, prefix, url) )
{ {
@ -720,7 +720,7 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Problems when submitting via FTP" << std::endl; ofs << " Problems when submitting via FTP" << std::endl;
return -1; return -1;
} }
if ( !this->TriggerUsingHTTP(files, prefix, m_CTest->GetDartConfiguration("TriggerSite")) ) if ( !this->TriggerUsingHTTP(files, prefix, m_CTest->GetCTestConfiguration("TriggerSite")) )
{ {
std::cerr << " Problems when triggering via HTTP" << std::endl; std::cerr << " Problems when triggering via HTTP" << std::endl;
ofs << " Problems when triggering via HTTP" << std::endl; ofs << " Problems when triggering via HTTP" << std::endl;
@ -730,28 +730,28 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Submission successful" << std::endl; ofs << " Submission successful" << std::endl;
return 0; return 0;
} }
else if ( m_CTest->GetDartConfiguration("DropMethod") == "http" ) else if ( m_CTest->GetCTestConfiguration("DropMethod") == "http" )
{ {
ofs << "Using drop method: HTTP" << std::endl; ofs << "Using drop method: HTTP" << std::endl;
std::cout << " Using HTTP submit method" << std::endl; std::cout << " Using HTTP submit method" << std::endl;
std::string url = "http://"; std::string url = "http://";
if ( m_CTest->GetDartConfiguration("DropSiteUser").size() > 0 ) if ( m_CTest->GetCTestConfiguration("DropSiteUser").size() > 0 )
{ {
url += m_CTest->GetDartConfiguration("DropSiteUser"); url += m_CTest->GetCTestConfiguration("DropSiteUser");
if ( m_CTest->GetDartConfiguration("DropSitePassword").size() > 0 ) if ( m_CTest->GetCTestConfiguration("DropSitePassword").size() > 0 )
{ {
url += ":" + m_CTest->GetDartConfiguration("DropSitePassword"); url += ":" + m_CTest->GetCTestConfiguration("DropSitePassword");
} }
url += "@"; url += "@";
} }
url += m_CTest->GetDartConfiguration("DropSite") + m_CTest->GetDartConfiguration("DropLocation"); url += m_CTest->GetCTestConfiguration("DropSite") + m_CTest->GetCTestConfiguration("DropLocation");
if ( !this->SubmitUsingHTTP(buildDirectory +"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) ) if ( !this->SubmitUsingHTTP(buildDirectory +"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) )
{ {
std::cerr << " Problems when submitting via HTTP" << std::endl; std::cerr << " Problems when submitting via HTTP" << std::endl;
ofs << " Problems when submitting via HTTP" << std::endl; ofs << " Problems when submitting via HTTP" << std::endl;
return -1; return -1;
} }
if ( !this->TriggerUsingHTTP(files, prefix, m_CTest->GetDartConfiguration("TriggerSite")) ) if ( !this->TriggerUsingHTTP(files, prefix, m_CTest->GetCTestConfiguration("TriggerSite")) )
{ {
std::cerr << " Problems when triggering via HTTP" << std::endl; std::cerr << " Problems when triggering via HTTP" << std::endl;
ofs << " Problems when triggering via HTTP" << std::endl; ofs << " Problems when triggering via HTTP" << std::endl;
@ -761,12 +761,12 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Submission successful" << std::endl; ofs << " Submission successful" << std::endl;
return 0; return 0;
} }
else if ( m_CTest->GetDartConfiguration("DropMethod") == "xmlrpc" ) else if ( m_CTest->GetCTestConfiguration("DropMethod") == "xmlrpc" )
{ {
ofs << "Using drop method: XML-RPC" << std::endl; ofs << "Using drop method: XML-RPC" << std::endl;
std::cout << " Using XML-RPC submit method" << std::endl; std::cout << " Using XML-RPC submit method" << std::endl;
std::string url = m_CTest->GetDartConfiguration("DropSite"); std::string url = m_CTest->GetCTestConfiguration("DropSite");
prefix = m_CTest->GetDartConfiguration("DropLocation"); prefix = m_CTest->GetCTestConfiguration("DropLocation");
if ( !this->SubmitUsingXMLRPC(buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) ) if ( !this->SubmitUsingXMLRPC(buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) )
{ {
std::cerr << " Problems when submitting via XML-RPC" << std::endl; std::cerr << " Problems when submitting via XML-RPC" << std::endl;
@ -777,16 +777,16 @@ int cmCTestSubmitHandler::ProcessHandler()
ofs << " Submission successful" << std::endl; ofs << " Submission successful" << std::endl;
return 0; return 0;
} }
else if ( m_CTest->GetDartConfiguration("DropMethod") == "scp" ) else if ( m_CTest->GetCTestConfiguration("DropMethod") == "scp" )
{ {
std::string url; std::string url;
if ( m_CTest->GetDartConfiguration("DropSiteUser").size() > 0 ) if ( m_CTest->GetCTestConfiguration("DropSiteUser").size() > 0 )
{ {
url += m_CTest->GetDartConfiguration("DropSiteUser") + "@"; url += m_CTest->GetCTestConfiguration("DropSiteUser") + "@";
} }
url += m_CTest->GetDartConfiguration("DropSite") + ":" + m_CTest->GetDartConfiguration("DropLocation"); url += m_CTest->GetCTestConfiguration("DropSite") + ":" + m_CTest->GetCTestConfiguration("DropLocation");
if ( !this->SubmitUsingSCP(m_CTest->GetDartConfiguration("ScpCommand"), if ( !this->SubmitUsingSCP(m_CTest->GetCTestConfiguration("ScpCommand"),
buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) ) buildDirectory+"/Testing/"+m_CTest->GetCurrentTag(), files, prefix, url) )
{ {
std::cerr << " Problems when submitting via SCP" << std::endl; std::cerr << " Problems when submitting via SCP" << std::endl;
@ -796,15 +796,15 @@ int cmCTestSubmitHandler::ProcessHandler()
std::cout << " Submission successful" << std::endl; std::cout << " Submission successful" << std::endl;
ofs << " Submission successful" << std::endl; ofs << " Submission successful" << std::endl;
} }
std::cout << " Unknown submission method: \"" << m_CTest->GetDartConfiguration("DropMethod") << "\"" << std::endl; std::cout << " Unknown submission method: \"" << m_CTest->GetCTestConfiguration("DropMethod") << "\"" << std::endl;
return -1; return -1;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
std::string cmCTestSubmitHandler::GetSubmitResultsPrefix() std::string cmCTestSubmitHandler::GetSubmitResultsPrefix()
{ {
std::string name = m_CTest->GetDartConfiguration("Site") + std::string name = m_CTest->GetCTestConfiguration("Site") +
"___" + m_CTest->GetDartConfiguration("BuildName") + "___" + m_CTest->GetCTestConfiguration("BuildName") +
"___" + m_CTest->GetCurrentTag() + "-" + "___" + m_CTest->GetCurrentTag() + "-" +
m_CTest->GetTestModelString() + "___XML___"; m_CTest->GetTestModelString() + "___XML___";
return name; return name;

View File

@ -31,7 +31,7 @@ bool cmCTestTestCommand::InitialPass(
const char* build_dir = args[0].c_str(); const char* build_dir = args[0].c_str();
const char* res_var = args[1].c_str(); const char* res_var = args[1].c_str();
m_CTest->SetDartConfiguration("BuildDirectory", build_dir); m_CTest->SetCTestConfiguration("BuildDirectory", build_dir);
cmCTestGenericHandler* handler = m_CTest->GetHandler("test"); cmCTestGenericHandler* handler = m_CTest->GetHandler("test");
if ( !handler ) if ( !handler )

View File

@ -31,8 +31,8 @@ bool cmCTestUpdateCommand::InitialPass(
const char* source_dir = args[0].c_str(); const char* source_dir = args[0].c_str();
const char* res_var = args[1].c_str(); const char* res_var = args[1].c_str();
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "CVSCommand", "CTEST_CVS_COMMAND"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "CVSCommand", "CTEST_CVS_COMMAND");
m_CTest->SetDartConfigurationFromCMakeVariable(m_Makefile, "SVNCommand", "CTEST_SVN_COMMAND"); m_CTest->SetCTestConfigurationFromCMakeVariable(m_Makefile, "SVNCommand", "CTEST_SVN_COMMAND");
cmCTestGenericHandler* handler = m_CTest->GetHandler("update"); cmCTestGenericHandler* handler = m_CTest->GetHandler("update");
if ( !handler ) if ( !handler )

View File

@ -218,13 +218,13 @@ int cmCTestUpdateHandler::ProcessHandler()
std::cout << "Updating the repository: " << sourceDirectory << std::endl; std::cout << "Updating the repository: " << sourceDirectory << std::endl;
// Get update command // Get update command
std::string updateCommand = m_CTest->GetDartConfiguration("UpdateCommand"); std::string updateCommand = m_CTest->GetCTestConfiguration("UpdateCommand");
if ( updateCommand.empty() ) if ( updateCommand.empty() )
{ {
updateCommand = m_CTest->GetDartConfiguration("CVSCommand"); updateCommand = m_CTest->GetCTestConfiguration("CVSCommand");
if ( updateCommand.empty() ) if ( updateCommand.empty() )
{ {
updateCommand = m_CTest->GetDartConfiguration("SVNCommand"); updateCommand = m_CTest->GetCTestConfiguration("SVNCommand");
if ( updateCommand.empty() ) if ( updateCommand.empty() )
{ {
std::cerr << "Cannot find CVSCommand, SVNCommand, or UpdateCommand key in the DartConfiguration.tcl" << std::endl; std::cerr << "Cannot find CVSCommand, SVNCommand, or UpdateCommand key in the DartConfiguration.tcl" << std::endl;
@ -242,20 +242,20 @@ int cmCTestUpdateHandler::ProcessHandler()
} }
else else
{ {
updateType = this->DetermineType(updateCommand.c_str(), m_CTest->GetDartConfiguration("UpdateType").c_str()); updateType = this->DetermineType(updateCommand.c_str(), m_CTest->GetCTestConfiguration("UpdateType").c_str());
} }
// And update options // And update options
std::string updateOptions = m_CTest->GetDartConfiguration("UpdateOptions"); std::string updateOptions = m_CTest->GetCTestConfiguration("UpdateOptions");
if ( updateOptions.empty() ) if ( updateOptions.empty() )
{ {
switch (updateType) switch (updateType)
{ {
case cmCTestUpdateHandler::e_CVS: case cmCTestUpdateHandler::e_CVS:
updateOptions = m_CTest->GetDartConfiguration("CVSUpdateOptions"); updateOptions = m_CTest->GetCTestConfiguration("CVSUpdateOptions");
break; break;
case cmCTestUpdateHandler::e_SVN: case cmCTestUpdateHandler::e_SVN:
updateOptions = m_CTest->GetDartConfiguration("SVNUpdateOptions"); updateOptions = m_CTest->GetCTestConfiguration("SVNUpdateOptions");
break; break;
} }
} }
@ -264,7 +264,7 @@ int cmCTestUpdateHandler::ProcessHandler()
std::string extra_update_opts; std::string extra_update_opts;
if ( m_CTest->GetTestModel() == cmCTest::NIGHTLY ) if ( m_CTest->GetTestModel() == cmCTest::NIGHTLY )
{ {
struct tm* t = cmCTest::GetNightlyTime(m_CTest->GetDartConfiguration("NightlyStartTime"), struct tm* t = cmCTest::GetNightlyTime(m_CTest->GetCTestConfiguration("NightlyStartTime"),
m_Verbose, m_CTest->GetTomorrowTag()); m_Verbose, m_CTest->GetTomorrowTag());
char current_time[1024]; char current_time[1024];
sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d", sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d",
@ -418,8 +418,8 @@ int cmCTestUpdateHandler::ProcessHandler()
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<Update mode=\"Client\" Generator=\"ctest-" << "<Update mode=\"Client\" Generator=\"ctest-"
<< cmVersion::GetCMakeVersion() << "\">\n" << cmVersion::GetCMakeVersion() << "\">\n"
<< "\t<Site>" << m_CTest->GetDartConfiguration("Site") << "</Site>\n" << "\t<Site>" << m_CTest->GetCTestConfiguration("Site") << "</Site>\n"
<< "\t<BuildName>" << m_CTest->GetDartConfiguration("BuildName") << "\t<BuildName>" << m_CTest->GetCTestConfiguration("BuildName")
<< "</BuildName>\n" << "</BuildName>\n"
<< "\t<BuildStamp>" << m_CTest->GetCurrentTag() << "-" << "\t<BuildStamp>" << m_CTest->GetCurrentTag() << "-"
<< m_CTest->GetTestModelString() << "</BuildStamp>" << std::endl; << m_CTest->GetTestModelString() << "</BuildStamp>" << std::endl;

View File

@ -344,7 +344,7 @@ int cmCTest::Initialize(const char* binary_dir)
//std::cout << "TestModel: " << m_TestModel << std::endl; //std::cout << "TestModel: " << m_TestModel << std::endl;
if ( m_TestModel == cmCTest::NIGHTLY ) if ( m_TestModel == cmCTest::NIGHTLY )
{ {
lctime = cmCTest::GetNightlyTime(m_DartConfiguration["NightlyStartTime"], lctime = cmCTest::GetNightlyTime(m_CTestConfiguration["NightlyStartTime"],
m_ExtraVerbose, m_ExtraVerbose,
m_TomorrowTag); m_TomorrowTag);
} }
@ -424,13 +424,13 @@ bool cmCTest::UpdateCTestConfiguration()
} }
std::string key = line.substr(0, cpos); std::string key = line.substr(0, cpos);
std::string value = cmCTest::CleanString(line.substr(cpos+1, line.npos)); std::string value = cmCTest::CleanString(line.substr(cpos+1, line.npos));
m_DartConfiguration[key] = value; m_CTestConfiguration[key] = value;
} }
fin.close(); fin.close();
if ( m_ProduceXML ) if ( m_ProduceXML )
{ {
m_TimeOut = atoi(m_DartConfiguration["TimeOut"].c_str()); m_TimeOut = atoi(m_CTestConfiguration["TimeOut"].c_str());
m_CompressXMLFiles = cmSystemTools::IsOn(m_DartConfiguration["CompressSubmission"].c_str()); m_CompressXMLFiles = cmSystemTools::IsOn(m_CTestConfiguration["CompressSubmission"].c_str());
} }
return true; return true;
} }
@ -621,7 +621,7 @@ int cmCTest::ProcessTests()
if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] ) if ( m_Tests[UPDATE_TEST] || m_Tests[ALL_TEST] )
{ {
cmCTestGenericHandler* uphandler = this->GetHandler("update"); cmCTestGenericHandler* uphandler = this->GetHandler("update");
uphandler->SetOption("SourceDirectory", this->GetDartConfiguration("SourceDirectory").c_str()); uphandler->SetOption("SourceDirectory", this->GetCTestConfiguration("SourceDirectory").c_str());
update_count = uphandler->ProcessHandler(); update_count = uphandler->ProcessHandler();
if ( update_count < 0 ) if ( update_count < 0 )
{ {
@ -977,10 +977,10 @@ int cmCTest::RunTest(std::vector<const char*> argv,
void cmCTest::StartXML(std::ostream& ostr) void cmCTest::StartXML(std::ostream& ostr)
{ {
ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<Site BuildName=\"" << m_DartConfiguration["BuildName"] << "<Site BuildName=\"" << m_CTestConfiguration["BuildName"]
<< "\" BuildStamp=\"" << m_CurrentTag << "-" << "\" BuildStamp=\"" << m_CurrentTag << "-"
<< this->GetTestModelString() << "\" Name=\"" << this->GetTestModelString() << "\" Name=\""
<< m_DartConfiguration["Site"] << "\" Generator=\"ctest" << m_CTestConfiguration["Site"] << "\" Generator=\"ctest"
<< cmVersion::GetCMakeVersion() << cmVersion::GetCMakeVersion()
<< "\">" << std::endl; << "\">" << std::endl;
} }
@ -990,14 +990,14 @@ void cmCTest::EndXML(std::ostream& ostr)
ostr << "</Site>" << std::endl; ostr << "</Site>" << std::endl;
} }
int cmCTest::GenerateDartNotesOutput(std::ostream& os, const cmCTest::tm_VectorOfStrings& files) int cmCTest::GenerateCTestNotesOutput(std::ostream& os, const cmCTest::tm_VectorOfStrings& files)
{ {
cmCTest::tm_VectorOfStrings::const_iterator it; cmCTest::tm_VectorOfStrings::const_iterator it;
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" os << "<?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" << "<?xml-stylesheet type=\"text/xsl\" href=\"Dart/Source/Server/XSL/Build.xsl <file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
<< "<Site BuildName=\"" << m_DartConfiguration["BuildName"] << "\" BuildStamp=\"" << "<Site BuildName=\"" << m_CTestConfiguration["BuildName"] << "\" BuildStamp=\""
<< m_CurrentTag << "-" << this->GetTestModelString() << "\" Name=\"" << m_CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
<< m_DartConfiguration["Site"] << "\" Generator=\"ctest" << m_CTestConfiguration["Site"] << "\" Generator=\"ctest"
<< cmVersion::GetCMakeVersion() << cmVersion::GetCMakeVersion()
<< "\">\n" << "\">\n"
<< "<Notes>" << std::endl; << "<Notes>" << std::endl;
@ -1056,7 +1056,7 @@ int cmCTest::GenerateNotesFile(const char* cfiles)
return 1; return 1;
} }
this->GenerateDartNotesOutput(ofs, files); this->GenerateCTestNotesOutput(ofs, files);
return 0; return 0;
} }
@ -1995,8 +1995,8 @@ void cmCTest::PopulateCustomInteger(cmMakefile* mf, const char* def, int& val)
std::string cmCTest::GetShortPathToFile(const char* cfname) std::string cmCTest::GetShortPathToFile(const char* cfname)
{ {
const std::string& sourceDir = this->GetDartConfiguration("SourceDirectory"); const std::string& sourceDir = this->GetCTestConfiguration("SourceDirectory");
const std::string& buildDir = this->GetDartConfiguration("BuildDirectory"); const std::string& buildDir = this->GetCTestConfiguration("BuildDirectory");
std::string fname = cmSystemTools::CollapseFullPath(cfname); std::string fname = cmSystemTools::CollapseFullPath(cfname);
// Find relative paths to both directories // Find relative paths to both directories
@ -2046,12 +2046,12 @@ std::string cmCTest::GetShortPathToFile(const char* cfname)
return path; return path;
} }
std::string cmCTest::GetDartConfiguration(const char *name) std::string cmCTest::GetCTestConfiguration(const char *name)
{ {
return m_DartConfiguration[name]; return m_CTestConfiguration[name];
} }
void cmCTest::SetDartConfiguration(const char *name, const char* value) void cmCTest::SetCTestConfiguration(const char *name, const char* value)
{ {
if ( !name ) if ( !name )
{ {
@ -2059,10 +2059,10 @@ void cmCTest::SetDartConfiguration(const char *name, const char* value)
} }
if ( !value ) if ( !value )
{ {
m_DartConfiguration.erase(name); m_CTestConfiguration.erase(name);
return; return;
} }
m_DartConfiguration[name] = value; m_CTestConfiguration[name] = value;
} }
@ -2096,7 +2096,7 @@ bool cmCTest::GetProduceXML()
return m_ProduceXML; return m_ProduceXML;
} }
bool cmCTest::SetDartConfigurationFromCMakeVariable(cmMakefile* mf, const char* dconfig, const char* cmake_var) bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, const char* dconfig, const char* cmake_var)
{ {
const char* ctvar; const char* ctvar;
ctvar = mf->GetDefinition(cmake_var); ctvar = mf->GetDefinition(cmake_var);
@ -2104,6 +2104,6 @@ bool cmCTest::SetDartConfigurationFromCMakeVariable(cmMakefile* mf, const char*
{ {
return false; return false;
} }
this->SetDartConfiguration(dconfig, ctvar); this->SetCTestConfiguration(dconfig, ctvar);
return true; return true;
} }

View File

@ -94,8 +94,8 @@ public:
std::string GetTestModelString(); std::string GetTestModelString();
static int GetTestModelFromString(const char* str); static int GetTestModelFromString(const char* str);
static std::string CleanString(const std::string& str); static std::string CleanString(const std::string& str);
std::string GetDartConfiguration(const char *name); std::string GetCTestConfiguration(const char *name);
void SetDartConfiguration(const char *name, const char* value); void SetCTestConfiguration(const char *name, const char* value);
/** /**
* constructor and destructor * constructor and destructor
@ -191,7 +191,7 @@ public:
/* /*
* Set the CTest variable from CMake variable * Set the CTest variable from CMake variable
*/ */
bool SetDartConfigurationFromCMakeVariable(cmMakefile* mf, const char* dconfig, const char* cmake_var); bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, const char* dconfig, const char* cmake_var);
//! Make string safe to be send as an URL //! Make string safe to be send as an URL
static std::string MakeURLSafe(const std::string&); static std::string MakeURLSafe(const std::string&);
@ -229,10 +229,10 @@ private:
}; };
//! Map of configuration properties //! Map of configuration properties
typedef std::map<cmStdString, cmStdString> tm_DartConfigurationMap; typedef std::map<cmStdString, cmStdString> tm_CTestConfigurationMap;
std::string m_CTestConfigFile; std::string m_CTestConfigFile;
tm_DartConfigurationMap m_DartConfiguration; tm_CTestConfigurationMap m_CTestConfiguration;
int m_Tests[LAST_TEST]; int m_Tests[LAST_TEST];
std::string m_CurrentTag; std::string m_CurrentTag;
@ -279,7 +279,7 @@ private:
bool UpdateCTestConfiguration(); bool UpdateCTestConfiguration();
//! Create not from files. //! Create not from files.
int GenerateDartNotesOutput(std::ostream& os, const tm_VectorOfStrings& files); int GenerateCTestNotesOutput(std::ostream& os, const tm_VectorOfStrings& files);
///! Run CMake and build a test and then run it as a single test. ///! Run CMake and build a test and then run it as a single test.
int RunCMakeAndTest(std::string* output); int RunCMakeAndTest(std::string* output);