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

Unified Diff: tools/determinism/remove_build_metadata.py

Issue 2930483002: swarming: Don't normalize .apk files (breaks alignment) (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/determinism/remove_build_metadata.py
diff --git a/tools/determinism/remove_build_metadata.py b/tools/determinism/remove_build_metadata.py
index c6c11c4f2ba78531e85b9d2bc0e993368520f553..f3205aa53bb4c93158d0c465a74c30488216516a 100755
--- a/tools/determinism/remove_build_metadata.py
+++ b/tools/determinism/remove_build_metadata.py
@@ -28,8 +28,8 @@ _ZAP_TIMESTAMP_BLACKLIST = {
def get_files_to_clean(build_dir, recursive=False):
"""Get the list of files to clean."""
allowed = frozenset(
- ('', '.apk', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so'))
- non_x_ok_exts = frozenset(('.apk', '.isolated', '.jar'))
+ ('', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so'))
+ non_x_ok_exts = frozenset(('.isolated', '.jar'))
min_timestamp = 0
if os.path.exists(os.path.join(build_dir, 'build.ninja')):
min_timestamp = os.path.getmtime(os.path.join(build_dir, 'build.ninja'))
@@ -78,7 +78,7 @@ def remove_pe_metadata(filename):
def remove_zip_timestamps(filename):
- """Remove the timestamps embedded in an apk archive."""
+ """Remove the timestamps embedded in a zip archive."""
sys.stdout.write('Processing: %s\n' % os.path.basename(filename))
with zipfile.ZipFile(filename, 'r') as zf:
# Creates a temporary file.
@@ -106,7 +106,7 @@ def remove_metadata_worker(file_queue, failed_queue, build_dir):
if f.endswith(('.dll', '.exe')):
if remove_pe_metadata(os.path.join(build_dir, f)):
failed_queue.put(f)
- elif f.endswith(('.apk', '.jar')):
+ elif f.endswith('.jar'):
remove_zip_timestamps(os.path.join(build_dir, f))
file_queue.task_done()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698