gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r987923 - in /gump/trunk/python/gump/core/model: misc.py project.py
Date Sun, 22 Aug 2010 16:11:02 GMT
Author: bodewig
Date: Sun Aug 22 16:11:02 2010
New Revision: 987923

URL: http://svn.apache.org/viewvc?rev=987923&view=rev
Log:
allow projects to provide multiple directories with test reports

Modified:
    gump/trunk/python/gump/core/model/misc.py
    gump/trunk/python/gump/core/model/project.py

Modified: gump/trunk/python/gump/core/model/misc.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/misc.py?rev=987923&r1=987922&r2=987923&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/misc.py (original)
+++ gump/trunk/python/gump/core/model/misc.py Sun Aug 22 16:11:02 2010
@@ -23,7 +23,7 @@
 
 import os
 
-from gump.core.model.object import NamedModelObject, ModelObject
+from gump.core.model.object import ModelObject
 
 class Positioned:
     def __init__(self): 
@@ -112,8 +112,8 @@ class Resolvable(ModelObject):
     def getResolvedPath(self):
         return self.path
 
-# represents a <junitreport/> element
-class JunitReport(Resolvable):
+# represents a <report/> element
+class Report(Resolvable):
     def __init__(self, dom, owner):
         Resolvable.__init__(self, dom, owner)
 

Modified: gump/trunk/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/trunk/python/gump/core/model/project.py?rev=987923&r1=987922&r2=987923&view=diff
==============================================================================
--- gump/trunk/python/gump/core/model/project.py (original)
+++ gump/trunk/python/gump/core/model/project.py Sun Aug 22 16:11:02 2010
@@ -32,7 +32,7 @@ from gump.core.model.builder import Ant,
     Script, Configure, Make
 from gump.core.model.depend import Dependable, importDomDependency
 from gump.core.model.misc import AddressPair, \
-    Resultable, Positioned, Mkdir, Delete, JunitReport, Work
+    Resultable, Positioned, Mkdir, Delete, Report, Work
 from gump.core.model.object import NamedModelObject
 from gump.core.model.output import Output
 from gump.core.model.state import REASON_CONFIG_FAILED, STATE_FAILED, \
@@ -586,11 +586,10 @@ class Project(NamedModelObject, Statable
             self.deletes.append(delete)
 
         # Grab all the reports (junit for now)
-        if self.hasDomChild('junitreport'):
-            junitreport = self.getDomChild('junitreport')
-            report = JunitReport(junitreport, self)
-            report.complete()
-            self.reports.append(report)
+        for r in self.getDomChildIterator('junitreport'):
+            self._add_report(r)
+        for r in self.getDomChildIterator('report'):
+            self._add_report(r)
 
         # Grab all notifications
         for notifyEntry in self.getDomChildIterator('nag'):
@@ -921,6 +920,11 @@ class Project(NamedModelObject, Statable
             for o in remove:
                 self.outputs[output_type].remove(o)
 
+    def _add_report(self, report_dom):
+        report = Report(report_dom, self)
+        report.complete()
+        self.reports.append(report)
+
 class ProjectStatistics(Statistics):
     """Statistics Holder"""
     def __init__(self, projectName):



Mime
View raw message