Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2763)

Unified Diff: build/android/pylib/utils/md5sum.py

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/utils/md5sum.py
diff --git a/build/android/pylib/utils/md5sum.py b/build/android/pylib/utils/md5sum.py
index 4d0d7038be4ae5602cd822bb66118a0de4390031..da3cd15c785b0da5a2382816078d6817f63fc7aa 100644
--- a/build/android/pylib/utils/md5sum.py
+++ b/build/android/pylib/utils/md5sum.py
@@ -19,7 +19,7 @@ MD5SUM_DEVICE_BIN_PATH = MD5SUM_DEVICE_LIB_PATH + 'md5sum_bin'
MD5SUM_DEVICE_SCRIPT_FORMAT = (
'test -f {path} -o -d {path} '
- '&& LD_LIBRARY_PATH={md5sum_lib} {md5sum_bin} {path}')
+ '&& LD_LIBRARY_PATH={md5sum_lib} {device_pie_wrapper} {md5sum_bin} {path}')
def CalculateHostMd5Sums(paths):
@@ -56,12 +56,15 @@ def CalculateDeviceMd5Sums(paths, device):
MD5SUM_DEVICE_LIB_PATH)
out = []
+
with tempfile.NamedTemporaryFile() as md5sum_script_file:
with device_temp_file.DeviceTempFile(
device.adb) as md5sum_device_script_file:
+ device_pie_wrapper = device.GetDevicePieWrapper()
md5sum_script = (
MD5SUM_DEVICE_SCRIPT_FORMAT.format(
path=p, md5sum_lib=MD5SUM_DEVICE_LIB_PATH,
+ device_pie_wrapper=device_pie_wrapper,
md5sum_bin=MD5SUM_DEVICE_BIN_PATH)
for p in paths)
md5sum_script_file.write('; '.join(md5sum_script))
@@ -69,5 +72,5 @@ def CalculateDeviceMd5Sums(paths, device):
device.adb.Push(md5sum_script_file.name, md5sum_device_script_file.name)
out = device.RunShellCommand(['sh', md5sum_device_script_file.name])
- return [HashAndPath(*l.split(None, 1)) for l in out]
+ return [HashAndPath(*l.split(None, 1)) for l in out if l]
« no previous file with comments | « build/android/pylib/remote/device/remote_device_test_run.py ('k') | build/android/pylib/utils/mock_calls.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698