babune junitxml not well formed on Python 2.7

Bug #625589 reported by Martin Packman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned
pyjunitxml
Fix Released
Undecided
Martin Packman

Bug Description

All babune runs on Python 2.7 have failed at the end with an xml parser error trying to read the results, which in essence is:

    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity

The problem document is generated with subunit2junitxml from subunit which uses pyjunitxml to write the xml.

The issue may be from a particular test failure output that Python 2.7 happens to trigger rather than an incompatibility in the generation code. Either way, pyjunitxml should be ensuring it's creating well formed output.

Related branches

Martin Packman (gz)
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Martin Packman (gz) wrote :

So, this isn't 2.7 specific but instead is caused by the unicode handling in pyjunitxml, as can also be seen on the babune windows bot now that the thread leaks have been squashed down a bit:

<http://babune.ladeuil.net:24842/job/selftest-windows/149/console>

Traceback (most recent call last):
  File "//VBOXSRV/babune/bin/subunit2junitxml", line 57, in <module>
    result.stopTestRun()
  File "\\VBOXSRV\babune\lib\python\junitxml\__init__.py", line 119, in stopTestRun
    self._stream.write((''.join(self._results)).encode('utf8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4099: ordinal not in range(128)

Changed in pyjunitxml:
assignee: nobody → Martin [gz] (gz)
status: New → Confirmed
Changed in pyjunitxml:
status: Confirmed → Fix Released
milestone: none → 0.6
Revision history for this message
Martin Packman (gz) wrote :

Results are now working on babune so I'll mark this as fix released in bzr as well.

Changed in bzr:
status: Confirmed → Fix Released
Martin Packman (gz)
tags: added: python27
removed: python2.7
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.