Bug 1141519: if we try call marionette calls in the teardown and they don't work we should just carry on; r=jgriffin

This commit is contained in:
David Burns 2015-09-16 20:58:28 +01:00
parent 411872a993
commit 6f2e216df4

View File

@ -691,10 +691,17 @@ class MarionetteTestCase(CommonTestCase):
def tearDown(self):
if not self.marionette.check_for_crash():
self.marionette.clear_imported_scripts()
self.marionette.execute_script("log('TEST-END: %s:%s')" %
(self.filepath.replace('\\', '\\\\'), self.methodName))
self.marionette.test_name = None
try:
self.marionette.clear_imported_scripts()
self.marionette.execute_script("log('TEST-END: %s:%s')" %
(self.filepath.replace('\\', '\\\\'),
self.methodName))
self.marionette.test_name = None
except:
# We have tried to log the test end when there is no listener
# object that we can access
pass
CommonTestCase.tearDown(self)
def get_new_emulator(self):