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

Unified Diff: build/android/binary_size/apk_downloader.py

Issue 2757293002: Android: Add APK patch size estimates to resource_sizes.py. (Closed)
Patch Set: Fix import & make args descriptive Created 3 years, 9 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/binary_size/__init__.py ('k') | build/android/binary_size/apks/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/binary_size/apk_downloader.py
diff --git a/build/android/binary_size/update_apks.py b/build/android/binary_size/apk_downloader.py
similarity index 95%
rename from build/android/binary_size/update_apks.py
rename to build/android/binary_size/apk_downloader.py
index a197e64a12675e47c5583878e17ff81080b47a2f..b90fe5f92c98870f5c9aa7218bc14e8188e68109 100755
--- a/build/android/binary_size/update_apks.py
+++ b/build/android/binary_size/apk_downloader.py
@@ -23,13 +23,16 @@ DEFAULT_APK = 'MonochromePublic.apk'
def MaybeDownloadApk(builder, milestone, apk, download_path, bucket):
+ """Returns path to the downloaded APK or None if not found."""
apk_path = os.path.join(download_path, builder, milestone, apk)
sha1_path = apk_path + '.sha1'
base_url = os.path.join(bucket, builder, milestone)
if os.path.exists(apk_path):
print '%s already exists' % apk_path
+ return apk_path
elif not os.path.exists(sha1_path):
print 'Skipping %s, file not found' % sha1_path
+ return None
else:
download_from_google_storage.download_from_google_storage(
input_filename=sha1_path,
@@ -46,6 +49,7 @@ def MaybeDownloadApk(builder, milestone, apk, download_path, bucket):
verbose=True,
auto_platform=False,
extract=False)
+ return apk_path
def main():
« no previous file with comments | « build/android/binary_size/__init__.py ('k') | build/android/binary_size/apks/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698