From de2ef3053c37d0a958a92f8d763168d5b4e5dc17 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Sun, 24 May 2015 00:13:15 +0200 Subject: 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. --- Source/cmCTest.cxx | 112 ----------------------------------------------------- Source/cmCTest.h | 3 -- 2 files changed, 115 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 16edd1f..cc42f47 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1491,64 +1491,6 @@ std::string cmCTest::SafeBuildIdField(const std::string& value) } //---------------------------------------------------------------------- -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 << "\n" - << "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) { if(this->CurrentTag.empty()) @@ -1610,53 +1552,6 @@ void cmCTest::StartXML(cmXMLWriter& xml, bool append) } //---------------------------------------------------------------------- -void cmCTest::AddSiteProperties(std::ostream& ostr) -{ - cmCTestScriptHandler* ch = - static_cast(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 << "\n"; - const char* labels = - ch->GetCMake()->GetState() - ->GetGlobalProperty("SubProjectLabels"); - if(labels) - { - ostr << " \n"; - std::string l = labels; - std::vector args; - cmSystemTools::ExpandListArgument(l, args); - for(std::vector::iterator i = args.begin(); - i != args.end(); ++i) - { - ostr << " \n"; - } - ostr << " \n"; - } - ostr << "\n"; - } - - // This code should stay when cdash only does label based sub-projects - const char* label = cm->GetState()->GetGlobalProperty("Label"); - if(label) - { - ostr << "\n"; - ostr << " \n"; - ostr << "\n"; - } -} - -//---------------------------------------------------------------------- void cmCTest::AddSiteProperties(cmXMLWriter& xml) { cmCTestScriptHandler* ch = @@ -1704,13 +1599,6 @@ void cmCTest::AddSiteProperties(cmXMLWriter& xml) } } - -//---------------------------------------------------------------------- -void cmCTest::EndXML(std::ostream& ostr) -{ - ostr << "" << std::endl; -} - //---------------------------------------------------------------------- void cmCTest::EndXML(cmXMLWriter& xml) { diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 7153e8f..db3ea10 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -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;} -- cgit v0.12