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

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

Issue 677443002: Deterministic recipe: Remove the PDBs from the list of files to compare. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
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
« 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 """Compare the artifacts from two builds.""" 5 """Compare the artifacts from two builds."""
6 6
7 import filecmp 7 import filecmp
8 import json 8 import json
9 import optparse 9 import optparse
10 import os 10 import os
11 import sys 11 import sys
12 12
13 13
14 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 14 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
15 15
16 16
17 def get_files_to_compare(build_dir): 17 def get_files_to_compare(build_dir):
18 """Get the list of files to compare.""" 18 """Get the list of files to compare."""
19 allowed = frozenset( 19 allowed = frozenset(
20 ('', '.app', '.dll', '.dylib', '.exe', '.nexe', '.pdb', '.so')) 20 ('', '.app', '.dll', '.dylib', '.exe', '.nexe', '.so'))
21 21
22 def check(f): 22 def check(f):
23 if not os.path.isfile(f): 23 if not os.path.isfile(f):
24 return False 24 return False
25 if os.path.basename(f).startswith('.'): 25 if os.path.basename(f).startswith('.'):
26 return False 26 return False
27 ext = os.path.splitext(f)[1] 27 ext = os.path.splitext(f)[1]
28 if ext == '.isolated': 28 if ext == '.isolated':
29 return True 29 return True
30 return ext in allowed and os.access(f, os.X_OK) 30 return ext in allowed and os.access(f, os.X_OK)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 parser.error('--first-build-dir is required') 77 parser.error('--first-build-dir is required')
78 if not options.second_build_dir: 78 if not options.second_build_dir:
79 parser.error('--second-build-dir is required') 79 parser.error('--second-build-dir is required')
80 80
81 return compare_build_artifacts(options.first_build_dir, 81 return compare_build_artifacts(options.first_build_dir,
82 options.second_build_dir) 82 options.second_build_dir)
83 83
84 84
85 if __name__ == '__main__': 85 if __name__ == '__main__':
86 sys.exit(main()) 86 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