XML test output fails if there are tests that have been skipped

RESOLVED FIXED in Firefox 19

Status

Testing
Marionette
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jgriffin, Assigned: mihneadb)

Tracking

unspecified
mozilla20
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox19 fixed, b2g18 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Traceback (most recent call last):
  File "/var/jenkins/workspace/b2g.gaia.unagi/.env/bin/gaiatest", line 9, in <module>
    load_entry_point('gaiatest==0.4', 'console_scripts', 'gaiatest')()
  File "/var/jenkins/workspace/b2g.gaia.unagi/gaiatest/runtests.py", line 17, in main
    cli(runner_class=GaiaTestRunner)
  File "/var/jenkins/workspace/b2g.gaia.unagi/.env/local/lib/python2.7/site-packages/marionette_client-0.5.11-py2.7.egg/marionette/runtests.py", line 702, in cli
    runner = startTestRunner(runner_class, options, tests)
  File "/var/jenkins/workspace/b2g.gaia.unagi/.env/local/lib/python2.7/site-packages/marionette_client-0.5.11-py2.7.egg/marionette/runtests.py", line 697, in startTestRunner
    runner.run_tests(tests, testtype=options.type)
  File "/var/jenkins/workspace/b2g.gaia.unagi/.env/local/lib/python2.7/site-packages/marionette_client-0.5.11-py2.7.egg/marionette/runtests.py", line 369, in run_tests
    f.write(self.generate_xml(self.results))
  File "/var/jenkins/workspace/b2g.gaia.unagi/.env/local/lib/python2.7/site-packages/marionette_client-0.5.11-py2.7.egg/marionette/runtests.py", line 528, in generate_xml
    _extract_xml(*tup, result='error')
  File "/var/jenkins/workspace/b2g.gaia.unagi/.env/local/lib/python2.7/site-packages/marionette_client-0.5.11-py2.7.egg/marionette/runtests.py", line 493, in _extract_xml
    testcase.setAttribute('time', str(test.duration))
AttributeError: 'TestSettings' object has no attribute 'duration'

This occurs because test.duration is defined in tearDown, but tearDown isn't always called for skipped tests, or tests that fail in setUp.
(Reporter)

Updated

5 years ago
Depends on: 816035
(Assignee)

Comment 1

5 years ago
Created attachment 691525 [details] [diff] [review]
fix this
Attachment #691525 - Flags: review?(jgriffin)
(Reporter)

Comment 2

5 years ago
Comment on attachment 691525 [details] [diff] [review]
fix this

Review of attachment 691525 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.  I'm going to bump the setup.py version and then push this to pypi as well.
Attachment #691525 - Flags: review?(jgriffin) → review+
(Reporter)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/652e6b974c13
(Reporter)

Comment 4

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/5b0d8f23de9f
(Reporter)

Comment 5

5 years ago
http://hg.mozilla.org/releases/mozilla-b2g18/rev/516c1b407c93
status-firefox19: --- → fixed
Target Milestone: --- → mozilla20
(Reporter)

Updated

5 years ago
Whiteboard: [status-b2g18:fixed]

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/652e6b974c13
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
status-b2g18: --- → fixed
Whiteboard: [status-b2g18:fixed]
Blocks: 819664
You need to log in before you can comment on or make changes to this bug.