Closed
Bug 811330
Opened 13 years ago
Closed 13 years ago
XML report generation fails when any tests are skipped
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox18 fixed, firefox19 fixed)
RESOLVED
FIXED
mozilla19
People
(Reporter: davehunt, Assigned: davehunt)
Details
Attachments
(1 file)
498 bytes,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
If a test is skipped and you have provided the command line option to save an XML report, an exception is thrown:
$ gaiatest --address=localhost:2828 --type=b2g --xml-output=results.xml gaiatest/tests/test_browser.py
starting httpd
running webserver on http://192.168.252.204:43211/
TEST-START test_browser.py
test_browser_basic (test_browser.TestBrowser) ... skipped "Don't want to run this on CI"
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK (skipped=1)
SUMMARY
-------
passed: 0
failed: 0
todo: 1
Traceback (most recent call last):
File "/home/mozilla/.virtualenvs/Gaia/bin/gaiatest", line 8, in <module>
load_entry_point('gaiatest==0.2', 'console_scripts', 'gaiatest')()
File "/home/mozilla/gaia-ui-tests/gaiatest/runtests.py", line 17, in main
cli(runner_class=GaiaTestRunner)
File "/home/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 718, in cli
runner = startTestRunner(runner_class, options, tests)
File "/home/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 713, in startTestRunner
runner.run_tests(tests, testtype=options.type)
File "/home/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 374, in run_tests
f.write(self.generate_xml(self.results))
File "/home/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 564, in generate_xml
_extract_xml(*tup, result='Skip')
File "/home/mozilla/mozilla-central/testing/marionette/client/marionette/runtests.py", line 520, in _extract_xml
t.appendChild(f)
UnboundLocalError: local variable 'f' referenced before assignment
Assignee | ||
Comment 1•13 years ago
|
||
This patch fixes the issue for tests skipped using unittest.skip, however there appears to still be an issue when tests are skipped via a manifest.
Attachment #681072 -
Flags: review?(jgriffin)
Comment 2•13 years ago
|
||
Comment on attachment 681072 [details] [diff] [review]
Fix report when tests are skipped using unittest.skip
Review of attachment 681072 [details] [diff] [review]:
-----------------------------------------------------------------
Good catch!
Attachment #681072 -
Flags: review?(jgriffin) → review+
Updated•13 years ago
|
Assignee: nobody → dhunt
Comment 3•13 years ago
|
||
Comment 4•13 years ago
|
||
Updated•13 years ago
|
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Updated•3 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•