diff options
author | Snild Dolkow <snild@sony.com> | 2020-09-23 10:34:03 +0200 |
---|---|---|
committer | Hsin-Yi Chen <hsinyichen@google.com> | 2020-10-06 03:13:42 +0000 |
commit | cfcccf314d6ebd2d641205684ad4c69cba741789 (patch) | |
tree | 687c1579dfa46edb1c1fefbd4e281c590455cc6a | |
parent | 75b3f163f864fa100f7aa7df3977d8b728d39633 (diff) | |
download | vndk-cfcccf314d6ebd2d641205684ad4c69cba741789.tar.gz |
Disable compression in AdbPull()
Compression makes adb pull slower, enough to make the /vendor pull
in vts_vndk_dependency_test time out on some devices.
Commit I9ed6f37bc55b1d55ae7c0c29a70a0e79b91ff683 updates the default
for adb pull, but VTS may run with an older version. Setting the
ADB_COMPRESSION environment variable to 0 will disable compression
for all versions supporting it, and does no harm otherwise.
This change takes vts_vndk_dependency_test from 396 to 181 seconds
on my device, allowing it to finish within the 6-minute deadline.
Change-Id: Ic0a5e5e5ac07a78f593619487c66376ab1a417df
-rw-r--r-- | utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -32,7 +32,10 @@ class AndroidDevice(object): def AdbPull(self, src, dst): cmd = ["adb", "-s", self._serial_number, "pull", src, dst] - subprocess.check_call(cmd, shell=False, stdin=subprocess.PIPE, + env = os.environ.copy() + if "ADB_COMPRESSION" not in env: + env["ADB_COMPRESSION"] = "0" + subprocess.check_call(cmd, shell=False, env=env, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) def Execute(self, *args): |