UnicodeDecodeError in XML report generation

RESOLVED DUPLICATE of bug 1054948

Status

Testing
Marionette
RESOLVED DUPLICATE of bug 1054948
4 years ago
3 years ago

People

(Reporter: zac, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [runner])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
It began with this commit:

https://github.com/davidflanagan/gaia/commit/e1f0bd0afb1b57e057c60796cb49fb3aef4053ca#diff-5c05a67a937ee8ac3412932a743d8bbeR29


test_settings_change_keyboard_language.py test_settings_change_keyboard_language.TestChangeKeyboardLanguage.test_change_keyboard_language_settings
starting httpd
Traceback (most recent call last):
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/.env/bin/gaiatest", line 9, in <module>
    load_entry_point('gaiatest==0.13', 'console_scripts', 'gaiatest')()
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 352, in main
    cli(runner_class=GaiaTestRunner, parser_class=GaiaTestOptions)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.6.1-py2.7.egg/marionette/runtests.py", line 887, in cli
    runner = startTestRunner(runner_class, options, tests)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.6.1-py2.7.egg/marionette/runtests.py", line 879, in startTestRunner
    runner.run_tests(tests)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 216, in run_tests
    MarionetteTestRunner.run_tests(self, tests)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.6.1-py2.7.egg/marionette/runtests.py", line 532, in run_tests
    f.write(self.generate_xml(self.results))
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.6.1-py2.7.egg/marionette/runtests.py", line 709, in generate_xml
    return doc.toprettyxml(encoding='utf-8')
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 57, in toprettyxml
    self.writexml(writer, "", indent, newl, encoding)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1751, in writexml
    node.writexml(writer, indent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 816, in writexml
    node.writexml(writer, indent+addindent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 816, in writexml
    node.writexml(writer, indent+addindent, addindent, newl)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 812, in writexml
    self.childNodes[0].writexml(writer, '', '', '')
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1040, in writexml
    _write_data(writer, "%s%s%s" % (indent, self.data, newl))
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 297, in _write_data
    writer.write(data)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-aurora.ui/.env/lib/python2.7/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 78: ordinal not in range(128)
+ OUT=1
+ cat jobs.txt
4966
Assignee: nobody → florin.strugariu
Created attachment 825257 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13256

Pointer to Github pull-request
Attachment #825257 - Flags: review?(zcampbell)
Attachment #825257 - Flags: review?(dave.hunt)
(Reporter)

Comment 2

4 years ago
Comment on attachment 825257 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13256

see pr
Attachment #825257 - Flags: review?(zcampbell) → review-

Updated

4 years ago
Attachment #825257 - Flags: review?(dave.hunt)
(Reporter)

Comment 3

4 years ago
Comment on attachment 825257 [details]
Pointer to Github pull request: https://github.com/mozilla-b2g/gaia/pull/13256

re-reviewed using latest Gaia, is r+
Attachment #825257 - Flags: review- → review+
(Reporter)

Comment 4

4 years ago
Merged test fix:
https://github.com/mozilla-b2g/gaia/commit/c8e1eb8b06bc2e3e02fcf57e206f07b1be02ecc4

I will leave this bug open for a patch to the XML report functionality to handle this which is the real purpose of the bug.

At least with the test running again it is not time critical, at least until the next devs checks in some unescaped strings :)
Thanks Zac, we should fix the XML report to handle these characters rather than avoiding using them. Also, we should allow the HTML report to still be generated if the XML report fails.
I will unassigns myself
Assignee: florin.strugariu → nobody
Whiteboard: [runner]
(Reporter)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1054948
You need to log in before you can comment on or make changes to this bug.