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

Side by Side Diff: tools/bisect-builds.py

Issue 2742003002: Provide instructions if -o or -r is used on public bisect-builds.py (Closed)
Patch Set: Rebase Created 3 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 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 (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 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 """Snapshot Build Bisect Tool 6 """Snapshot Build Bisect Tool
7 7
8 This script bisects a snapshot archive using binary search. It starts at 8 This script bisects a snapshot archive using binary search. It starts at
9 a bad revision (it will try to guess HEAD) and asks for a last known-good 9 a bad revision (it will try to guess HEAD) and asks for a last known-good
10 revision. It will then binary search across this revision range by downloading, 10 revision. It will then binary search across this revision range by downloading,
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 data = json.loads(url.read()) 994 data = json.loads(url.read())
995 if 'git_sha' in data: 995 if 'git_sha' in data:
996 return data['git_sha'] 996 return data['git_sha']
997 997
998 def PrintChangeLog(min_chromium_rev, max_chromium_rev): 998 def PrintChangeLog(min_chromium_rev, max_chromium_rev):
999 """Prints the changelog URL.""" 999 """Prints the changelog URL."""
1000 1000
1001 print (' ' + CHANGELOG_URL % (GetGitHashFromSVNRevision(min_chromium_rev), 1001 print (' ' + CHANGELOG_URL % (GetGitHashFromSVNRevision(min_chromium_rev),
1002 GetGitHashFromSVNRevision(max_chromium_rev))) 1002 GetGitHashFromSVNRevision(max_chromium_rev)))
1003 1003
1004 def error_internal_option(option, opt, value, parser):
1005 raise optparse.OptionValueError(
1006 'The -o and -r options are only\navailable in the internal version of '
1007 'this script. Google\nemployees should visit http://go/bisect-builds '
1008 'for\nconfiguration instructions.')
1004 1009
1005 def main(): 1010 def main():
1006 usage = ('%prog [options] [-- chromium-options]\n' 1011 usage = ('%prog [options] [-- chromium-options]\n'
1007 'Perform binary search on the snapshot builds to find a minimal\n' 1012 'Perform binary search on the snapshot builds to find a minimal\n'
1008 'range of revisions where a behavior change happened. The\n' 1013 'range of revisions where a behavior change happened. The\n'
1009 'behaviors are described as "good" and "bad".\n' 1014 'behaviors are described as "good" and "bad".\n'
1010 'It is NOT assumed that the behavior of the later revision is\n' 1015 'It is NOT assumed that the behavior of the later revision is\n'
1011 'the bad one.\n' 1016 'the bad one.\n'
1012 '\n' 1017 '\n'
1013 'Revision numbers should use\n' 1018 'Revision numbers should use\n'
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 default=False, 1084 default=False,
1080 help='Use a local file in the current directory to cache ' 1085 help='Use a local file in the current directory to cache '
1081 'a list of known revisions to speed up the ' 1086 'a list of known revisions to speed up the '
1082 'initialization of this script.') 1087 'initialization of this script.')
1083 parser.add_option('--verify-range', 1088 parser.add_option('--verify-range',
1084 dest='verify_range', 1089 dest='verify_range',
1085 action='store_true', 1090 action='store_true',
1086 default=False, 1091 default=False,
1087 help='Test the first and last revisions in the range ' + 1092 help='Test the first and last revisions in the range ' +
1088 'before proceeding with the bisect.') 1093 'before proceeding with the bisect.')
1094 parser.add_option("-r", action="callback", callback=error_internal_option)
1095 parser.add_option("-o", action="callback", callback=error_internal_option)
1089 1096
1090 (opts, args) = parser.parse_args() 1097 (opts, args) = parser.parse_args()
1091 1098
1092 if opts.archive is None: 1099 if opts.archive is None:
1093 print 'Error: missing required parameter: --archive' 1100 print 'Error: missing required parameter: --archive'
1094 print 1101 print
1095 parser.print_help() 1102 parser.print_help()
1096 return 1 1103 return 1
1097 1104
1098 if opts.asan: 1105 if opts.asan:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 if min_blink_rev != max_blink_rev: 1191 if min_blink_rev != max_blink_rev:
1185 print ('NOTE: There is a Blink roll in the range, ' 1192 print ('NOTE: There is a Blink roll in the range, '
1186 'you might also want to do a Blink bisect.') 1193 'you might also want to do a Blink bisect.')
1187 1194
1188 print 'CHANGELOG URL:' 1195 print 'CHANGELOG URL:'
1189 PrintChangeLog(min_chromium_rev, max_chromium_rev) 1196 PrintChangeLog(min_chromium_rev, max_chromium_rev)
1190 1197
1191 1198
1192 if __name__ == '__main__': 1199 if __name__ == '__main__':
1193 sys.exit(main()) 1200 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