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

Side by Side Diff: scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py

Issue 703763004: Add .apk to compare_build_artifacts.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Compare the artifacts from two builds.""" 6 """Compare the artifacts from two builds."""
7 7
8 import difflib 8 import difflib
9 import json 9 import json
10 import optparse 10 import optparse
11 import os 11 import os
12 import struct 12 import struct
13 import sys 13 import sys
14 import time 14 import time
15 15
16 16
17 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 17 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
18 18
19 19
20 def get_files_to_compare(build_dir): 20 def get_files_to_compare(build_dir):
21 """Get the list of files to compare.""" 21 """Get the list of files to compare."""
22 allowed = frozenset( 22 allowed = frozenset(
23 ('', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so')) 23 ('', '.apk', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so'))
24 24
25 def check(f): 25 def check(f):
26 if not os.path.isfile(f): 26 if not os.path.isfile(f):
27 return False 27 return False
28 if os.path.basename(f).startswith('.'): 28 if os.path.basename(f).startswith('.'):
29 return False 29 return False
30 ext = os.path.splitext(f)[1] 30 ext = os.path.splitext(f)[1]
31 if ext == '.isolated': 31 if ext == '.isolated':
32 return True 32 return True
33 return ext in allowed and os.access(f, os.X_OK) 33 return ext in allowed and os.access(f, os.X_OK)
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 parser.error('--first-build-dir is required') 174 parser.error('--first-build-dir is required')
175 if not options.second_build_dir: 175 if not options.second_build_dir:
176 parser.error('--second-build-dir is required') 176 parser.error('--second-build-dir is required')
177 177
178 return compare_build_artifacts(options.first_build_dir, 178 return compare_build_artifacts(options.first_build_dir,
179 options.second_build_dir) 179 options.second_build_dir)
180 180
181 181
182 if __name__ == '__main__': 182 if __name__ == '__main__':
183 sys.exit(main()) 183 sys.exit(main())
OLDNEW
« 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