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

Unified Diff: build/android/gyp/jar_toc.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 | « build/android/gyp/jar.py ('k') | build/android/gyp/javac.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/jar_toc.py
diff --git a/build/android/gyp/jar_toc.py b/build/android/gyp/jar_toc.py
index b40f43dca6647d1cb7a918bbf28e674f57ecb0cf..9db9d2665b5261e5b237e8146a42631eed50f04d 100755
--- a/build/android/gyp/jar_toc.py
+++ b/build/android/gyp/jar_toc.py
@@ -81,13 +81,13 @@ def UpdateToc(jar_path, toc_path):
def DoJarToc(options):
jar_path = options.jar_path
toc_path = options.toc_path
- md5_stamp_path = '%s.md5' % toc_path
- md5_checker = md5_check.Md5Checker(stamp=md5_stamp_path, inputs=[jar_path])
- if md5_checker.IsStale():
- UpdateToc(jar_path, toc_path)
- md5_checker.Write()
- else:
- build_utils.Touch(toc_path)
+ record_path = '%s.md5.stamp' % toc_path
+ md5_check.CallAndRecordIfStale(
+ lambda: UpdateToc(jar_path, toc_path),
+ record_path=record_path,
+ input_paths=[jar_path],
+ )
+ build_utils.Touch(toc_path)
def main(argv):
« no previous file with comments | « build/android/gyp/jar.py ('k') | build/android/gyp/javac.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698