diff options
author | Snild Dolkow <snild@sony.com> | 2020-09-23 10:34:03 +0200 |
---|---|---|
committer | Snild Dolkow <snild@sony.com> | 2020-10-09 13:25:00 +0200 |
commit | 8522b76f55becef3a0f843e8e762331ed72f93fb (patch) | |
tree | 922bbe6c2854b9920f5332db2dfe1a5e2b91517e | |
parent | c362225e2414ba8f7bc9b4db3ccf9f1433d9fe4a (diff) | |
download | vndk-8522b76f55becef3a0f843e8e762331ed72f93fb.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
(cherry picked from commit cfcccf314d6ebd2d641205684ad4c69cba741789)
-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): |