From 52c831099e5fed55482c3d8cf43b457e37843bd6 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 12 Oct 2010 16:03:56 +0100 Subject: [PATCH] gtester-report: Add an optional 'revision' node In order to distinguish reports generated from a specific revision of a projects it would be good if gtester-report handled a node in the XML. The payload is free-form, just like for the other nodes under . https://bugzilla.gnome.org/show_bug.cgi?id=631980 --- glib/gtester-report | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/glib/gtester-report b/glib/gtester-report index 3bce548bf..0fcdd9ac3 100755 --- a/glib/gtester-report +++ b/glib/gtester-report @@ -135,6 +135,9 @@ class ReportReader (TreeProcess): 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') @@ -239,6 +242,8 @@ class HTMLReportWriter(ReportWriter): self.lastchar = message[-1] def handle_info (self): self.oprint ('

Package: %(package)s, version: %(version)s

\n' % self.info) + if self.info['revision']: + self.oprint ('
Report generated from: %(revision)s
\n' % self.info) def handle_text (self, node): self.oprint (node.nodeValue) def handle_testcase (self, node, binary):