mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1595245 - Translate remaining uncaught mozharness ADBErrors into task retries; r=bc
Most mozdevice access in mozharness was already encapsulated in try blocks, with only the shell_output() case neglected, consistent with the observed intermittent failures. Differential Revision: https://phabricator.services.mozilla.com/D52879 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
490b98f1e2
commit
8bf96dc04c
@ -339,7 +339,7 @@ class AndroidMixin(object):
|
||||
import mozdevice
|
||||
try:
|
||||
self.device.install_app(apk, replace=replace)
|
||||
except (mozdevice.ADBError, mozdevice.ADBTimeoutError) as e:
|
||||
except (mozdevice.ADBError, mozdevice.ADBProcessError, mozdevice.ADBTimeoutError) as e:
|
||||
self.info('Failed to install %s on %s: %s %s' %
|
||||
(apk, self.device_name,
|
||||
type(e).__name__, e))
|
||||
@ -356,11 +356,11 @@ class AndroidMixin(object):
|
||||
try:
|
||||
package_name = self.query_package_name()
|
||||
self.device.uninstall_app(package_name)
|
||||
except (mozdevice.ADBError, mozdevice.ADBTimeoutError) as e:
|
||||
except (mozdevice.ADBError, mozdevice.ADBProcessError, mozdevice.ADBTimeoutError) as e:
|
||||
self.info('Failed to uninstall %s from %s: %s %s' %
|
||||
(package_name, self.device_name,
|
||||
type(e).__name__, e))
|
||||
self.fatal('INFRA-ERROR: %s Failed to install %s' %
|
||||
self.fatal('INFRA-ERROR: %s Failed to uninstall %s' %
|
||||
(type(e).__name__, package_name),
|
||||
EXIT_STATUS_DICT[TBPL_RETRY])
|
||||
|
||||
@ -375,7 +375,15 @@ class AndroidMixin(object):
|
||||
return False
|
||||
|
||||
def shell_output(self, cmd):
|
||||
return self.device.shell_output(cmd, timeout=30)
|
||||
try:
|
||||
return self.device.shell_output(cmd, timeout=30)
|
||||
except (mozdevice.ADBTimeoutError) as e:
|
||||
self.info('Failed to run shell command %s from %s: %s %s' %
|
||||
(cmd, self.device_name,
|
||||
type(e).__name__, e))
|
||||
self.fatal('INFRA-ERROR: %s Failed to run shell command %s' %
|
||||
(type(e).__name__, cmd),
|
||||
EXIT_STATUS_DICT[TBPL_RETRY])
|
||||
|
||||
def device_screenshot(self, prefix):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user