[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / glib / gtester-report
index 3bce548..5bf076c 100755 (executable)
@@ -14,9 +14,7 @@
 # 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
@@ -135,6 +133,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 +240,8 @@ class HTMLReportWriter(ReportWriter):
       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):
@@ -372,7 +375,7 @@ class GTestCase(object):
     """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