babune junitxml not well formed on Python 2.7
Bug #625589 reported by
Martin Packman
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.
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
lp:~gz/pyjunitxml/ensure_well_formed_xml_625589
- Robert Collins: Needs Fixing
- Vincent Ladeuil: Approve
-
Diff: 275 lines (+181/-9) (has conflicts)2 files modifiedjunitxml/__init__.py (+57/-9)
junitxml/tests/test_junitxml.py (+124/-0)
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in pyjunitxml: | |
status: | Confirmed → Fix Released |
milestone: | none → 0.6 |
tags: |
added: python27 removed: python2.7 |
To post a comment you must log in.
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): babune/ bin/subunit2jun itxml", line 57, in <module> stopTestRun( ) babune\ lib\python\ junitxml\ __init_ _.py", line 119, in stopTestRun _stream. write(( ''.join( self._results) ).encode( 'utf8') )
File "//VBOXSRV/
result.
File "\\VBOXSRV\
self.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4099: ordinal not in range(128)