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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 627083002: [Android][DO NOT COMMIT] Testing push improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check existence, then MD5 sum all at once Created 6 years, 1 month 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
« no previous file with comments | « no previous file | build/android/pylib/utils/md5sum.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index c3ab135b0fb2e738006fe5e7950611557a20b7ec..31a0aeda80df36f8a451cfbe11fa30fb4b094391 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -25,6 +25,7 @@ from pylib.device import device_errors
from pylib.device.commands import install_commands
from pylib.utils import apk_helper
from pylib.utils import host_utils
+from pylib.utils import md5sum
from pylib.utils import parallelizer
from pylib.utils import timeout_retry
@@ -699,12 +700,13 @@ class DeviceUtils(object):
if not real_device_path:
return [(host_path, device_path)]
- # TODO(jbudorick): Move the md5 logic up into DeviceUtils or base
- # this function on mtime.
- # pylint: disable=protected-access
- host_hash_tuples, device_hash_tuples = self.old_interface._RunMd5Sum(
- real_host_path, real_device_path)
- # pylint: enable=protected-access
+ host_hash_tuples = md5sum.CalculateHostMd5Sums([real_host_path])
+ device_paths_to_md5 = (
+ real_device_path if os.path.isfile(real_host_path)
+ else ('%s/%s' % (real_device_path, os.path.relpath(p, real_host_path))
+ for _, p in host_hash_tuples))
+ device_hash_tuples = md5sum.CalculateDeviceMd5Sums(
+ device_paths_to_md5, self)
if os.path.isfile(host_path):
if (not device_hash_tuples
« no previous file with comments | « no previous file | build/android/pylib/utils/md5sum.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698