Running gtester-report on gtester output raises KeyError

Bug #1036260 reported by Ndubi Abenga
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GLib
Fix Released
Medium
glib2.0 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

I'm trying to set up some unit tests on a bunch of C code I'm writing, and decided to use GLib's testing framework.

Running the tests using "gtester test-executable -o output.xml" runs okay, but running gtester-report to generate a html report raises an error. The output is:

...

At the beginning, it outputs valid html, until the beginning of the <body> tag:

...
<body>
<h2>GTester Unit Test Report</h2>
Traceback (most recent call last):
  File "/usr/bin/gtester-report", line 492, in <module>
    main()
  File "/usr/bin/gtester-report", line 486, in main
    HTMLReportWriter(rr.get_info(), rr.binary_list()).printout()
  File "/usr/bin/gtester-report", line 350, in printout
    self.handle_info ()
  File "/usr/bin/gtester-report", line 244, in handle_info
    self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
KeyError: 'package'

Revision history for this message
Jason Conti (jconti) wrote :

Thanks for the bug report. I found an upstream bug here: https://bugzilla.gnome.org/show_bug.cgi?id=668035 and I submitted a simple patch to fix it.

You can workaround the issue by manually adding:

<info>
<package>PACKAGENAME</package>
<version>VERSION</version>
<revision>REVISION</revision>
</info>

to the generated xml. It seems that is exactly what glib does, to collect multiple reports together. (See Makefile.decl in the glib source)

Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Changed in glib:
importance: Unknown → Medium
status: Unknown → New
Changed in glib2.0 (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Changed in glib:
status: New → Confirmed
Changed in glib:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.