Description of problem:
gtester-report raised a exception after trying to parse a simple test results file generated by a simple glib test.
Version-Release number of selected component:
cmdline: /usr/bin/python /bin/gtester-report testresults.xml
runlevel: N 3
Traceback (most recent call last):
File "/bin/gtester-report", line 492, in <module>
File "/bin/gtester-report", line 486, in main
File "/bin/gtester-report", line 350, in printout
File "/bin/gtester-report", line 244, in handle_info
self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
Local variables in innermost frame:
self: <__main__.HTMLReportWriter object at 0x1485890>
Potential duplicate: bug 712731
Created attachment 838233 [details]
Created attachment 838234 [details]
Created attachment 838235 [details]
File: Screencast from 18-12-13 11:46:14.webm
Created attachment 838236 [details]
Created attachment 838264 [details]
Proposed patch to add default values to the missing fields in the XML report
gtester-report expect the fields "package", "version" and "revision" to exist in the XML file generated by gtester, but simple tests don't provide those fields to gtester and are missing in the generated XML file.
This causes an exception when running gtester-report with the generated XML file without those fields.
This patch adds a default value "unknown" to the package and version fields if they don't exists and avoids the revision line in the report if a revision don't exists in the XML.
Comment on attachment 838236 [details]
Simple test case to reproduce the bug.
Same bug confirmed in Fedora 20.
Same patch applies.
Looks like people are tweaking their makefiles to workaround this issue like in this chromium patch: http://git.chromium.org/gitweb/?p=chromiumos/third_party/libmbim.git;a=blobdiff;f=gtester.make;fp=gtester.make;h=40348dcd1dfc544c1bf4bcd89abba3f03fec4f0e;hp=0000000000000000000000000000000000000000;hb=d20e41ca6a90e335b89b7fcc386426f8d21ed259;hpb=a0a8d96d1b7c7db968ddb07216f0d8c6de12f1be
This issue can be fixed also by adding to the report file below <gtester> tag the <info> tag containing the package, version and revision:
Or by creating a script to put all the test files together on a report collection with the format:
(content of individual tests here)
A example script could be:
# variables change your settings here
FILES=`find $REPORT_DIR -name "*.xml"`
cat > $FNAME << EOF
for f in $FILES; do cat $f | sed -e "1,1s/^<?xml\b[^>?]*?>//" >> $FNAME;done;
echo "</report-collection>" >> $FNAME;
Another user experienced a similar problem:
Don’t know, sorry.
cmdline: /usr/bin/python /usr/bin/gtester-report test-report.xml
reason: gtester-report:244:handle_info:KeyError: 'package'
runlevel: N 5
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 19 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.