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

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

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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
« no previous file with comments | « build/android/pylib/utils/apk_helper.py ('k') | build/android/pylib/utils/md5sum_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/md5sum.py
diff --git a/build/android/pylib/utils/md5sum.py b/build/android/pylib/utils/md5sum.py
index ed2e6bc8a3385e8f50b93323c7d5cd9d67504123..3e61c8facb14f806ec4b4c29f5eb88f084672949 100644
--- a/build/android/pylib/utils/md5sum.py
+++ b/build/android/pylib/utils/md5sum.py
@@ -20,16 +20,19 @@ MD5SUM_DEVICE_SCRIPT_FORMAT = (
'test -f {path} -o -d {path} '
'&& LD_LIBRARY_PATH={md5sum_lib} {md5sum_bin} {path}')
-_STARTS_WITH_CHECKSUM_RE = re.compile(r'^\s*[0-9a-fA-f]{32}\s+')
+_STARTS_WITH_CHECKSUM_RE = re.compile(r'^\s*[0-9a-fA-F]{32}\s+')
def CalculateHostMd5Sums(paths):
"""Calculates the MD5 sum value for all items in |paths|.
+ Directories are traversed recursively and the MD5 sum of each file found is
+ reported in the result.
+
Args:
paths: A list of host paths to md5sum.
Returns:
- A dict mapping paths to their respective md5sum checksums.
+ A dict mapping file paths to their respective md5sum checksums.
"""
if isinstance(paths, basestring):
paths = [paths]
@@ -46,10 +49,13 @@ def CalculateHostMd5Sums(paths):
def CalculateDeviceMd5Sums(paths, device):
"""Calculates the MD5 sum value for all items in |paths|.
+ Directories are traversed recursively and the MD5 sum of each file found is
+ reported in the result.
+
Args:
paths: A list of device paths to md5sum.
Returns:
- A dict mapping paths to their respective md5sum checksums.
+ A dict mapping file paths to their respective md5sum checksums.
"""
if isinstance(paths, basestring):
paths = [paths]
« no previous file with comments | « build/android/pylib/utils/apk_helper.py ('k') | build/android/pylib/utils/md5sum_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698