Bug 1503590 - Improve resilience when initializing mozdevice from mozharness; r=bc
authorGeoff Brown <gbrown@mozilla.com>
Tue, 27 Nov 2018 13:38:00 -0700
changeset 504855 c0caa96ca64a9f9c5538d88b748208ca75233d60
parent 504854 920c0a874e738a781a087faba7e170aaed2f1fa3
child 504856 d87b95a8c72d513a21d4d6df44a6b7caa2f567a8
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbc
bugs1503590
milestone65.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 1503590 - Improve resilience when initializing mozdevice from mozharness; r=bc
testing/mozharness/mozharness/mozilla/testing/android.py
--- a/testing/mozharness/mozharness/mozilla/testing/android.py
+++ b/testing/mozharness/mozharness/mozilla/testing/android.py
@@ -323,19 +323,25 @@ class AndroidMixin(object):
         try:
             self.device.install_app(apk)
         except mozdevice.ADBError:
             self.fatal('INFRA-ERROR: Failed to install %s on %s' %
                        (self.installer_path, self.device_name),
                        EXIT_STATUS_DICT[TBPL_RETRY])
 
     def is_boot_completed(self):
-        out = self.device.get_prop('sys.boot_completed', timeout=30)
-        if out.strip() == '1':
-            return True
+        import mozdevice
+        try:
+            out = self.device.get_prop('sys.boot_completed', timeout=30)
+            if out.strip() == '1':
+                return True
+        except ValueError:
+            pass
+        except mozdevice.ADBError:
+            pass
         return False
 
     def shell_output(self, cmd):
         return self.device.shell_output(cmd, timeout=30)
 
     def device_screenshot(self, prefix):
         """
            On emulator, save a screenshot of the entire screen to the upload directory;