Closed Bug 821018 Opened 12 years ago Closed 12 years ago

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

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox19 fixed, b2g18 fixed)

RESOLVED FIXED
mozilla20
Tracking Status
firefox19 --- fixed
b2g18 --- fixed

People

(Reporter: jgriffin, Assigned: mihneadb)

References

Details

Attachments

(1 file)

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.
Depends on: 816035
Attached patch fix thisSplinter Review
Attachment #691525 - Flags: review?(jgriffin)
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+
Whiteboard: [status-b2g18:fixed]
https://hg.mozilla.org/mozilla-central/rev/652e6b974c13
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [status-b2g18:fixed]
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: