mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1172174 - Improve adb timeout handling for Android; r=armenzg
This commit is contained in:
parent
da2f44c856
commit
6a2b69b4b9
@ -134,11 +134,11 @@ class DeviceManagerADB(DeviceManager):
|
||||
args.extend(['-s', self._deviceSerial])
|
||||
args.extend(["shell", cmdline])
|
||||
|
||||
def _raise():
|
||||
raise DMError("Timeout exceeded for shell call")
|
||||
def _timeout():
|
||||
self._logger.error("Timeout exceeded for shell call '%s'" % ' '.join(args))
|
||||
|
||||
self._logger.debug("shell - command: %s" % ' '.join(args))
|
||||
proc = ProcessHandler(args, processOutputLine=self._log, onTimeout=_raise)
|
||||
proc = ProcessHandler(args, processOutputLine=self._log, onTimeout=_timeout)
|
||||
|
||||
if not timeout:
|
||||
# We are asserting that all commands will complete in this time unless otherwise specified
|
||||
@ -591,10 +591,13 @@ class DeviceManagerADB(DeviceManager):
|
||||
# time unless otherwise specified
|
||||
timeout = self.default_timeout
|
||||
|
||||
def _timeout():
|
||||
self._logger.error("Timeout exceeded for _checkCmd call '%s'" % ' '.join(finalArgs))
|
||||
|
||||
timeout = int(timeout)
|
||||
retries = 0
|
||||
while retries < retryLimit:
|
||||
proc = ProcessHandler(finalArgs, processOutputLine=self._log)
|
||||
proc = ProcessHandler(finalArgs, processOutputLine=self._log, onTimeout=_timeout)
|
||||
proc.run(timeout=timeout)
|
||||
ret_code = proc.wait()
|
||||
if ret_code == None:
|
||||
|
Loading…
Reference in New Issue
Block a user