зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1410723 - Throw DMError when getDirectory() fails suspiciously; r=bc
It looks like the main cause of intermittent failures in getDirectory is that the adb pull command fails because the emulator has hung. For other commands, we usually handle this by checking the return code and raising DMError if anything fails. There is mozharness/taskcluster code in place to automatically retry tasks that throw DMError.
This commit is contained in:
Родитель
48234431f4
Коммит
bdcd193026
|
@ -540,14 +540,17 @@ class DeviceManagerADB(DeviceManager):
|
|||
localDir = '/'.join(localDir.rstrip('/').split('/')[:-1])
|
||||
cmd = ["pull", remoteDir, localDir]
|
||||
proc = self._runCmd(cmd)
|
||||
if proc.returncode != 0:
|
||||
# Raise a DMError when the device is missing, but not when the
|
||||
# directory is empty or missing.
|
||||
if ("no devices/emulators found" in proc.output or
|
||||
("pulled" not in proc.output and
|
||||
"does not exist" not in proc.output)):
|
||||
raise DMError("getDirectory() failed to pull %s: %s" %
|
||||
(remoteDir, proc.output))
|
||||
if copyRequired:
|
||||
try:
|
||||
dir_util.copy_tree(localDir, originalLocal)
|
||||
mozfile.remove(tempParent)
|
||||
except:
|
||||
self._logger.error("getDirectory() failed after %s" % str(cmd))
|
||||
self._logger.error("rc=%d out=%s" % (proc.returncode, str(proc.output)))
|
||||
raise
|
||||
dir_util.copy_tree(localDir, originalLocal)
|
||||
mozfile.remove(tempParent)
|
||||
|
||||
def validateFile(self, remoteFile, localFile):
|
||||
md5Remote = self._getRemoteHash(remoteFile)
|
||||
|
|
Загрузка…
Ссылка в новой задаче