cmCTest: Drop unused method overloads

The StartXML, EndXML, and AddSiteProperties overloads that take a stream
directly are no longer called anywhere.  All clients hvae been ported to
cmXMLWriter.  Drop the old overloads.
This commit is contained in:
Daniel Pfeifer 2015-05-24 00:13:15 +02:00 committed by Brad King
parent b04500a725
commit de2ef3053c
2 changed files with 0 additions and 115 deletions

View File

@ -1490,64 +1490,6 @@ std::string cmCTest::SafeBuildIdField(const std::string& value)
return safevalue;
}
//----------------------------------------------------------------------
void cmCTest::StartXML(std::ostream& ostr, bool append)
{
if(this->CurrentTag.empty())
{
cmCTestLog(this, ERROR_MESSAGE,
"Current Tag empty, this may mean"
" NightlStartTime was not set correctly." << std::endl);
cmSystemTools::SetFatalErrorOccured();
}
// find out about the system
cmsys::SystemInformation info;
info.RunCPUCheck();
info.RunOSCheck();
info.RunMemoryCheck();
std::string buildname = cmCTest::SafeBuildIdField(
this->GetCTestConfiguration("BuildName"));
std::string stamp = cmCTest::SafeBuildIdField(
this->CurrentTag + "-" + this->GetTestModelString());
std::string site = cmCTest::SafeBuildIdField(
this->GetCTestConfiguration("Site"));
ostr << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
<< "<Site BuildName=\"" << buildname << "\"\n"
<< "\tBuildStamp=\"" << stamp << "\"\n"
<< "\tName=\"" << site << "\"\n"
<< "\tGenerator=\"ctest-" << cmVersion::GetCMakeVersion() << "\"\n"
<< (append? "\tAppend=\"true\"\n":"")
<< "\tCompilerName=\"" << this->GetCTestConfiguration("Compiler")
<< "\"\n"
#ifdef _COMPILER_VERSION
<< "\tCompilerVersion=\"_COMPILER_VERSION\"\n"
#endif
<< "\tOSName=\"" << info.GetOSName() << "\"\n"
<< "\tHostname=\"" << info.GetHostname() << "\"\n"
<< "\tOSRelease=\"" << info.GetOSRelease() << "\"\n"
<< "\tOSVersion=\"" << info.GetOSVersion() << "\"\n"
<< "\tOSPlatform=\"" << info.GetOSPlatform() << "\"\n"
<< "\tIs64Bits=\"" << info.Is64Bits() << "\"\n"
<< "\tVendorString=\"" << info.GetVendorString() << "\"\n"
<< "\tVendorID=\"" << info.GetVendorID() << "\"\n"
<< "\tFamilyID=\"" << info.GetFamilyID() << "\"\n"
<< "\tModelID=\"" << info.GetModelID() << "\"\n"
<< "\tProcessorCacheSize=\"" << info.GetProcessorCacheSize() << "\"\n"
<< "\tNumberOfLogicalCPU=\"" << info.GetNumberOfLogicalCPU() << "\"\n"
<< "\tNumberOfPhysicalCPU=\""<< info.GetNumberOfPhysicalCPU() << "\"\n"
<< "\tTotalVirtualMemory=\"" << info.GetTotalVirtualMemory() << "\"\n"
<< "\tTotalPhysicalMemory=\""<< info.GetTotalPhysicalMemory() << "\"\n"
<< "\tLogicalProcessorsPerPhysical=\""
<< info.GetLogicalProcessorsPerPhysical() << "\"\n"
<< "\tProcessorClockFrequency=\""
<< info.GetProcessorClockFrequency() << "\"\n"
<< ">" << std::endl;
this->AddSiteProperties(ostr);
}
//----------------------------------------------------------------------
void cmCTest::StartXML(cmXMLWriter& xml, bool append)
{
@ -1609,53 +1551,6 @@ void cmCTest::StartXML(cmXMLWriter& xml, bool append)
this->AddSiteProperties(xml);
}
//----------------------------------------------------------------------
void cmCTest::AddSiteProperties(std::ostream& ostr)
{
cmCTestScriptHandler* ch =
static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
cmake* cm = ch->GetCMake();
// if no CMake then this is the old style script and props like
// this will not work anyway.
if(!cm)
{
return;
}
// This code should go when cdash is changed to use labels only
const char* subproject = cm->GetState()
->GetGlobalProperty("SubProject");
if(subproject)
{
ostr << "<Subproject name=\"" << subproject << "\">\n";
const char* labels =
ch->GetCMake()->GetState()
->GetGlobalProperty("SubProjectLabels");
if(labels)
{
ostr << " <Labels>\n";
std::string l = labels;
std::vector<std::string> args;
cmSystemTools::ExpandListArgument(l, args);
for(std::vector<std::string>::iterator i = args.begin();
i != args.end(); ++i)
{
ostr << " <Label>" << *i << "</Label>\n";
}
ostr << " </Labels>\n";
}
ostr << "</Subproject>\n";
}
// This code should stay when cdash only does label based sub-projects
const char* label = cm->GetState()->GetGlobalProperty("Label");
if(label)
{
ostr << "<Labels>\n";
ostr << " <Label>" << label << "</Label>\n";
ostr << "</Labels>\n";
}
}
//----------------------------------------------------------------------
void cmCTest::AddSiteProperties(cmXMLWriter& xml)
{
@ -1704,13 +1599,6 @@ void cmCTest::AddSiteProperties(cmXMLWriter& xml)
}
}
//----------------------------------------------------------------------
void cmCTest::EndXML(std::ostream& ostr)
{
ostr << "</Site>" << std::endl;
}
//----------------------------------------------------------------------
void cmCTest::EndXML(cmXMLWriter& xml)
{

View File

@ -274,11 +274,9 @@ public:
static std::string SafeBuildIdField(const std::string& value);
//! Start CTest XML output file
void StartXML(std::ostream& ostr, bool append);
void StartXML(cmXMLWriter& xml, bool append);
//! End CTest XML output file
void EndXML(std::ostream& ostr);
void EndXML(cmXMLWriter& xml);
//! Run command specialized for make and configure. Returns process status
@ -423,7 +421,6 @@ public:
/** Direct process output to given streams. */
void SetStreams(std::ostream* out, std::ostream* err)
{ this->StreamOut = out; this->StreamErr = err; }
void AddSiteProperties(std::ostream& );
void AddSiteProperties(cmXMLWriter& xml);
bool GetLabelSummary() { return this->LabelSummary;}