Closed Bug 981568 Opened 6 years ago Closed 6 years ago

MarionetteTestCase not recovering from b2g crashes

Categories

(Testing :: Marionette, defect, major)

x86_64
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: zcampbell, Assigned: automatedtester)

References

Details

Attachments

(1 file)

MarionetteTestCase is not recovering from test cases.

After b2g crashes, MarionetteTestCase tries to delete_session in the tearDown. It is expecting a MarionetteException when b2g is down/server not responding.

However the marionette client is raising an IOError when it cannot connect to the server.

This kills the remainder of the test run.
Severity: normal → major
Assignee: nobody → dburns
out of tests is 


OK
TEST-START test_clock_set_alarm.py
test_clock_set_alarm (test_clock_set_alarm.TestClockSetAlarm) ... ERROR
ERROR
starting httpd
Traceback (most recent call last):
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/bin/gaiatest", line 8, in <module>
    load_entry_point('gaiatest==0.21.8', 'console_scripts', 'gaiatest')()
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/tests/python/gaia-ui-tests/gaiatest/runtests.py", line 49, in main
    cli(runner_class=GaiaTestRunner, parser_class=GaiaTestOptions)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runtests.py", line 28, in cli
    runner = startTestRunner(runner_class, options, tests)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runtests.py", line 19, in startTestRunner
    runner.run_tests(tests)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runner/base.py", line 761, in run_tests
    self.run_test_sets()
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runner/base.py", line 958, in run_test_sets
    self.run_test_set(in_process_tests)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runner/base.py", line 949, in run_test_set
    self.run_test(test['filepath'], test['expected'], test['oop'])
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runner/base.py", line 928, in run_test
    results = runner.run(suite)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/runner/base.py", line 284, in run
    test(result)
  File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib/python2.7/unittest/suite.py", line 108, in run
    test(result)
  File "/usr/lib/python2.7/unittest/case.py", line 391, in __call__
    return self.run(*args, **kwds)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette_test.py", line 200, in run
    self.cleanTest()
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette_test.py", line 279, in cleanTest
    self._deleteSession()
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette_test.py", line 291, in _deleteSession
    self.marionette.delete_session()
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 741, in delete_session
    response = self._send_message('deleteSession', 'ok')
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/marionette.py", line 598, in _send_message
    response = self.client.send(message)
  File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui/.env/local/lib/python2.7/site-packages/marionette_client-0.7.5-py2.7.egg/marionette/client.py", line 97, in send
    raise IOError("%s: Connection to Marionette server is lost. Check gecko.log (desktop firefox) or logcat (b2g) for errors." % str(e))
IOError: [Errno 32] Broken pipe: Connection to Marionette server is lost. Check gecko.log (desktop firefox) or logcat (b2g) for errors.
+ OUT=1
+ cat jobs.txt
Comment on attachment 8389262 [details] [diff] [review]
Handle if we get IOError if B2G crashes during a test run

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

This bug is fallout from bug 959520.  This looks like the right fix.
Attachment #8389262 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/0c7de28ed854
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.