# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
+# License along with this library; if not, see <http://www.gnu.org/licenses/>.
import datetime
import optparse
import sys, re, xml.dom.minidom
self.info['package'] = node_as_text (dn)
dn = find_child (node, 'version')
self.info['version'] = node_as_text (dn)
+ dn = find_child (node, 'revision')
+ if dn is not None:
+ self.info['revision'] = node_as_text (dn)
def handle_testcase (self, node):
self.last_binary.testcases += [ node ]
result = attribute_as_text (node, 'result', 'status')
def __init__(self, binary_list):
self.binaries = binary_list
- def _error_text(node):
+ def _error_text(self, node):
"""Get a string representing the error children of node."""
rlist = list_children(node, 'error')
txt = ''
self.lastchar = message[-1]
def handle_info (self):
self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
+ if self.info['revision']:
+ self.oprint ('<h5>Report generated from: %(revision)s</h5>\n' % self.info)
def handle_text (self, node):
self.oprint (node.nodeValue)
def handle_testcase (self, node, binary):
"""A representation of a gtester test result as a pyunit TestCase."""
def __init__(self, case, binary):
- """Create a GTestCase for case `case` from binary program `binary`."""
+ """Create a GTestCase for case 'case' from binary program 'binary'."""
self._case = case
self._binary = binary
# the name of the case - e.g. /dbusmenu/glib/objects/menuitem/props_boolstr