summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-01-09 17:05:23 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-01-09 17:05:23 (GMT)
commited387ffe6b72986856ca1f14c9ac11c4e12c5d6b (patch)
tree10bc89c82e4b6c9c23834e261fea52f9c771b12d /Source/cmCTest.cxx
parent86b103f2713113327d1ee9325e1c635ec41e4009 (diff)
downloadCMake-ed387ffe6b72986856ca1f14c9ac11c4e12c5d6b.zip
CMake-ed387ffe6b72986856ca1f14c9ac11c4e12c5d6b.tar.gz
CMake-ed387ffe6b72986856ca1f14c9ac11c4e12c5d6b.tar.bz2
ENH: add subproject tag property for ctest
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx48
1 files changed, 40 insertions, 8 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 15f1178..cbead3c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1309,9 +1309,40 @@ void cmCTest::StartXML(std::ostream& ostr)
<< "\tProcessorClockFrequency=\""
<< info.GetProcessorClockFrequency() << "\"\n"
<< ">" << std::endl;
+ this->AddSiteProperties(ostr);
}
//----------------------------------------------------------------------
+void cmCTest::AddSiteProperties(std::ostream& ostr)
+{
+ cmCTestScriptHandler* ch =
+ static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
+ const char* subproject =
+ ch->GetCMake()->GetProperty("SubProject", cmProperty::GLOBAL);
+ if(subproject)
+ {
+ ostr << "<Subproject name=\"" << subproject << "\">\n";
+ const char* labels =
+ ch->GetCMake()->GetProperty("SubProjectLabels", cmProperty::GLOBAL);
+ 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->c_str() << "</Label>\n";
+ }
+ ostr << " </Labels>\n";
+ }
+ ostr << "</Subproject>\n";
+ }
+}
+
+
+//----------------------------------------------------------------------
void cmCTest::EndXML(std::ostream& ostr)
{
ostr << "</Site>" << std::endl;
@@ -1323,16 +1354,17 @@ int cmCTest::GenerateCTestNotesOutput(std::ostream& os,
{
cmCTest::VectorOfStrings::const_iterator it;
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
- << "<?xml-stylesheet type=\"text/xsl\" "
+ << "<?xml-stylesheet type=\"text/xsl\" "
"href=\"Dart/Source/Server/XSL/Build.xsl "
"<file:///Dart/Source/Server/XSL/Build.xsl> \"?>\n"
- << "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
- << "\" BuildStamp=\""
- << this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
- << this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
- << cmVersion::GetCMakeVersion()
- << "\">\n"
- << "<Notes>" << std::endl;
+ << "<Site BuildName=\"" << this->GetCTestConfiguration("BuildName")
+ << "\" BuildStamp=\""
+ << this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\""
+ << this->GetCTestConfiguration("Site") << "\" Generator=\"ctest"
+ << cmVersion::GetCMakeVersion()
+ << "\">\n";
+ this->AddSiteProperties(os);
+ os << "<Notes>" << std::endl;
for ( it = files.begin(); it != files.end(); it ++ )
{