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

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

Issue 21150006: Introduce --cancel-first-run and reduce the strength of --no-first-run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add first_run::IsFirstRunSuppressed() Created 7 years, 4 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 | Annotate | Revision Log
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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 # trailing slash to just have a number. 180 # trailing slash to just have a number.
181 revisions = [] 181 revisions = []
182 for prefix in all_prefixes: 182 for prefix in all_prefixes:
183 revnum = prefix.text[prefix_len:-1] 183 revnum = prefix.text[prefix_len:-1]
184 try: 184 try:
185 revnum = int(revnum) 185 revnum = int(revnum)
186 revisions.append(revnum) 186 revisions.append(revnum)
187 except ValueError: 187 except ValueError:
188 pass 188 pass
189 return (revisions, next_marker) 189 return (revisions, next_marker)
190 190
191 # Fetch the first list of revisions. 191 # Fetch the first list of revisions.
192 (revisions, next_marker) = _FetchAndParse(self.GetListingURL()) 192 (revisions, next_marker) = _FetchAndParse(self.GetListingURL())
193 193
194 # If the result list was truncated, refetch with the next marker. Do this 194 # If the result list was truncated, refetch with the next marker. Do this
195 # until an entire directory listing is done. 195 # until an entire directory listing is done.
196 while next_marker: 196 while next_marker:
197 next_url = self.GetListingURL(next_marker) 197 next_url = self.GetListingURL(next_marker)
198 (new_revisions, next_marker) = _FetchAndParse(next_url) 198 (new_revisions, next_marker) = _FetchAndParse(next_url)
199 revisions.extend(new_revisions) 199 revisions.extend(new_revisions)
200 return revisions 200 return revisions
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 'the bad one.\n' 608 'the bad one.\n'
609 '\n' 609 '\n'
610 'Revision numbers should use\n' 610 'Revision numbers should use\n'
611 ' Official versions (e.g. 1.0.1000.0) for official builds. (-o)\n' 611 ' Official versions (e.g. 1.0.1000.0) for official builds. (-o)\n'
612 ' SVN revisions (e.g. 123456) for chromium builds, from trunk.\n' 612 ' SVN revisions (e.g. 123456) for chromium builds, from trunk.\n'
613 ' Use base_trunk_revision from http://omahaproxy.appspot.com/\n' 613 ' Use base_trunk_revision from http://omahaproxy.appspot.com/\n'
614 ' for earlier revs.\n' 614 ' for earlier revs.\n'
615 ' Chrome\'s about: build number and omahaproxy branch_revision\n' 615 ' Chrome\'s about: build number and omahaproxy branch_revision\n'
616 ' are incorrect, they are from branches.\n' 616 ' are incorrect, they are from branches.\n'
617 '\n' 617 '\n'
618 'Tip: add "-- --no-first-run" to bypass the first run prompts.') 618 'Tip: add "-- --skip-first-run" to bypass the first run prompts.')
619 parser = optparse.OptionParser(usage=usage) 619 parser = optparse.OptionParser(usage=usage)
620 # Strangely, the default help output doesn't include the choice list. 620 # Strangely, the default help output doesn't include the choice list.
621 choices = ['mac', 'win', 'linux', 'linux64', 'linux-arm'] 621 choices = ['mac', 'win', 'linux', 'linux64', 'linux-arm']
622 # linux-chromiumos lacks a continuous archive http://crbug.com/78158 622 # linux-chromiumos lacks a continuous archive http://crbug.com/78158
623 parser.add_option('-a', '--archive', 623 parser.add_option('-a', '--archive',
624 choices = choices, 624 choices = choices,
625 help = 'The buildbot archive to bisect [%s].' % 625 help = 'The buildbot archive to bisect [%s].' %
626 '|'.join(choices)) 626 '|'.join(choices))
627 parser.add_option('-o', action="store_true", dest='official_builds', 627 parser.add_option('-o', action="store_true", dest='official_builds',
628 help = 'Bisect across official ' + 628 help = 'Bisect across official ' +
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 print 'BLINK CHANGELOG URL:' 709 print 'BLINK CHANGELOG URL:'
710 print ' ' + BLINK_CHANGELOG_URL % (max_blink_rev, min_blink_rev) 710 print ' ' + BLINK_CHANGELOG_URL % (max_blink_rev, min_blink_rev)
711 print 'CHANGELOG URL:' 711 print 'CHANGELOG URL:'
712 if opts.official_builds: 712 if opts.official_builds:
713 print OFFICIAL_CHANGELOG_URL % (min_chromium_rev, max_chromium_rev) 713 print OFFICIAL_CHANGELOG_URL % (min_chromium_rev, max_chromium_rev)
714 else: 714 else:
715 print ' ' + CHANGELOG_URL % (min_chromium_rev, max_chromium_rev) 715 print ' ' + CHANGELOG_URL % (min_chromium_rev, max_chromium_rev)
716 716
717 if __name__ == '__main__': 717 if __name__ == '__main__':
718 sys.exit(main()) 718 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698