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

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

Issue 1085713002: [Android] DeviceUtils change to make Install work without md5 binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 da3cd15c785b0da5a2382816078d6817f63fc7aa..9d9d3caa50cfad65e71b6aa8190ced2d2a4a1475 100644
--- a/build/android/pylib/utils/md5sum.py
+++ b/build/android/pylib/utils/md5sum.py
@@ -33,9 +33,13 @@ def CalculateHostMd5Sums(paths):
if isinstance(paths, basestring):
paths = [paths]
+ md5sum_bin_host_path = os.path.join(
+ constants.GetOutDirectory(), 'md5sum_bin_host')
+ if not os.path.exists(md5sum_bin_host_path):
+ raise OSError('File not built: %s' % md5sum_bin_host_path)
+
out = cmd_helper.GetCmdOutput(
- [os.path.join(constants.GetOutDirectory(), 'md5sum_bin_host')] +
- [p for p in paths])
+ [md5sum_bin_host_path] + [p for p in paths])
return [HashAndPath(*l.split(None, 1)) for l in out.splitlines()]
@@ -50,10 +54,12 @@ def CalculateDeviceMd5Sums(paths, device):
if isinstance(paths, basestring):
paths = [paths]
+ md5sum_dist_path = os.path.join(constants.GetOutDirectory(), 'md5sum_dist')
+ if not os.path.exists(md5sum_dist_path):
+ raise OSError('File not built: %s' % md5sum_dist_path)
+
if not device.FileExists(MD5SUM_DEVICE_BIN_PATH):
- device.adb.Push(
- os.path.join(constants.GetOutDirectory(), 'md5sum_dist'),
- MD5SUM_DEVICE_LIB_PATH)
+ device.adb.Push(md5sum_dist_path, MD5SUM_DEVICE_LIB_PATH)
out = []

Powered by Google App Engine
This is Rietveld 408576698