Bug 1141519: if we try call marionette calls in the teardown and they don't work we should just carry on; r=jgriffin
☠☠ backed out by 8f15c6137e4f ☠ ☠
authorDavid Burns <dburns@mozilla.com>
Wed, 16 Sep 2015 20:58:28 +0100
changeset 295893 4f0cd3e94c0a34500c60951e3e80bcd312167fe5
parent 295892 2c319ee6609b45f254194005991218a8e6f1b1ce
child 295894 39fe4a6488237d8a8a91ba07aa8c24381eabff61
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs1141519
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1141519: if we try call marionette calls in the teardown and they don't work we should just carry on; r=jgriffin
testing/marionette/client/marionette/marionette_test.py
--- a/testing/marionette/client/marionette/marionette_test.py
+++ b/testing/marionette/client/marionette/marionette_test.py
@@ -686,20 +686,27 @@ class MarionetteTestCase(CommonTestCase)
     def setUp(self):
         CommonTestCase.setUp(self)
         self.marionette.test_name = self.test_name
         self.marionette.execute_script("log('TEST-START: %s:%s')" %
                                        (self.filepath.replace('\\', '\\\\'), self.methodName))
 
     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):
         self.extra_emulator_index += 1
         if len(self.marionette.extra_emulators) == self.extra_emulator_index:
             qemu  = Marionette(emulator=self.marionette.emulator.arch,
                                emulatorBinary=self.marionette.emulator.binary,
                                homedir=self.marionette.homedir,