diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-04-15 20:51:55 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-04-15 20:51:55 +0000 |
commit | 9816401d02e1687d542ccbf0ff5094d599deb808 (patch) | |
tree | ea2b4f737e86082dcd589814929bc4b7c4b46217 /scripts/update_device.py | |
parent | e4e1df71e199779c4fec2aa7602b55642f8559b8 (diff) | |
parent | 3a18895c6facd86b97d8cd0b955a2ab61f02cde4 (diff) |
Add 5s timeout to cleanup commands am: 3a18895c6f
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1674626
Change-Id: I446135b7a4a42c16d52810be4538cb3efdec9711
Diffstat (limited to 'scripts/update_device.py')
-rwxr-xr-x | scripts/update_device.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/update_device.py b/scripts/update_device.py index b784b1bc..3ce40a55 100755 --- a/scripts/update_device.py +++ b/scripts/update_device.py @@ -350,7 +350,7 @@ class AdbHost(object): if self._device_serial: self._command_prefix += ['-s', self._device_serial] - def adb(self, command): + def adb(self, command, timeout_seconds: float = None): """Run an ADB command like "adb push". Args: @@ -365,7 +365,7 @@ class AdbHost(object): command = self._command_prefix + command logging.info('Running: %s', ' '.join(str(x) for x in command)) p = subprocess.Popen(command, universal_newlines=True) - p.wait() + p.wait(timeout_seconds) return p.returncode def adb_output(self, command): @@ -546,7 +546,7 @@ def main(): if server_thread: server_thread.StopServer() for cmd in finalize_cmds: - dut.adb(cmd) + dut.adb(cmd, 5) return 0 |