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

Unified Diff: build/android/gyp/apk_install.py

Issue 14263006: [Android] Refactor md5_check + add tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_toc
Patch Set: Rebase Created 7 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
« no previous file with comments | « no previous file | build/android/gyp/create_device_library_links.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/apk_install.py
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py
index f8e7caab8d562ec2923e2071c995544307e6dd94..8f1e69b15ba937954670aa4f4de258096255fbd8 100755
--- a/build/android/gyp/apk_install.py
+++ b/build/android/gyp/apk_install.py
@@ -38,13 +38,12 @@ def main(argv):
options.apk_path]
serial_number = android_commands.AndroidCommands().Adb().GetSerialNumber()
- md5_stamp = '%s.%s.md5' % (options.apk_path, serial_number)
-
- md5_checker = md5_check.Md5Checker(
- stamp=md5_stamp, inputs=[options.apk_path], command=install_cmd)
- if md5_checker.IsStale():
- build_utils.CheckCallDie(install_cmd)
- md5_checker.Write()
+ record_path = '%s.%s.md5.stamp' % (options.apk_path, serial_number)
+ md5_check.CallAndRecordIfStale(
+ lambda: build_utils.CheckCallDie(install_cmd),
+ record_path=record_path,
+ input_paths=[options.apk_path],
+ input_strings=install_cmd)
if options.stamp:
build_utils.Touch(options.stamp)
« no previous file with comments | « no previous file | build/android/gyp/create_device_library_links.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698