OLD | NEW |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 self._archive_extract_dir = 'chrome-mac' | 84 self._archive_extract_dir = 'chrome-mac' |
85 elif self.platform == 'win': | 85 elif self.platform == 'win': |
86 self.archive_name = 'chrome-win32.zip' | 86 self.archive_name = 'chrome-win32.zip' |
87 self._archive_extract_dir = 'chrome-win32' | 87 self._archive_extract_dir = 'chrome-win32' |
88 self._binary_name = 'chrome.exe' | 88 self._binary_name = 'chrome.exe' |
89 else: | 89 else: |
90 raise Exception('Invalid platform: %s' % self.platform) | 90 raise Exception('Invalid platform: %s' % self.platform) |
91 | 91 |
92 if is_official: | 92 if is_official: |
93 if self.platform == 'linux': | 93 if self.platform == 'linux': |
94 self._listing_platform_dir = 'lucid32bit/' | 94 self._listing_platform_dir = 'precise32bit/' |
95 self.archive_name = 'chrome-lucid32bit.zip' | 95 self.archive_name = 'chrome-precise32bit.zip' |
96 self._archive_extract_dir = 'chrome-lucid32bit' | 96 self._archive_extract_dir = 'chrome-precise32bit' |
97 elif self.platform == 'linux64': | 97 elif self.platform == 'linux64': |
98 self._listing_platform_dir = 'lucid64bit/' | 98 self._listing_platform_dir = 'precise64bit/' |
99 self.archive_name = 'chrome-lucid64bit.zip' | 99 self.archive_name = 'chrome-precise64bit.zip' |
100 self._archive_extract_dir = 'chrome-lucid64bit' | 100 self._archive_extract_dir = 'chrome-precise64bit' |
101 elif self.platform == 'mac': | 101 elif self.platform == 'mac': |
102 self._listing_platform_dir = 'mac/' | 102 self._listing_platform_dir = 'mac/' |
103 self._binary_name = 'Google Chrome.app/Contents/MacOS/Google Chrome' | 103 self._binary_name = 'Google Chrome.app/Contents/MacOS/Google Chrome' |
104 elif self.platform == 'win': | 104 elif self.platform == 'win': |
105 if self.is_aura: | 105 if self.is_aura: |
106 self._listing_platform_dir = 'win-aura/' | 106 self._listing_platform_dir = 'win-aura/' |
107 else: | 107 else: |
108 self._listing_platform_dir = 'win/' | 108 self._listing_platform_dir = 'win/' |
109 else: | 109 else: |
110 if self.platform in ('linux', 'linux64', 'linux-arm'): | 110 if self.platform in ('linux', 'linux64', 'linux-arm'): |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 # trailing slash to just have a number. | 193 # trailing slash to just have a number. |
194 revisions = [] | 194 revisions = [] |
195 for prefix in all_prefixes: | 195 for prefix in all_prefixes: |
196 revnum = prefix.text[prefix_len:-1] | 196 revnum = prefix.text[prefix_len:-1] |
197 try: | 197 try: |
198 revnum = int(revnum) | 198 revnum = int(revnum) |
199 revisions.append(revnum) | 199 revisions.append(revnum) |
200 except ValueError: | 200 except ValueError: |
201 pass | 201 pass |
202 return (revisions, next_marker) | 202 return (revisions, next_marker) |
203 | 203 |
204 # Fetch the first list of revisions. | 204 # Fetch the first list of revisions. |
205 (revisions, next_marker) = _FetchAndParse(self.GetListingURL()) | 205 (revisions, next_marker) = _FetchAndParse(self.GetListingURL()) |
206 | 206 |
207 # If the result list was truncated, refetch with the next marker. Do this | 207 # If the result list was truncated, refetch with the next marker. Do this |
208 # until an entire directory listing is done. | 208 # until an entire directory listing is done. |
209 while next_marker: | 209 while next_marker: |
210 next_url = self.GetListingURL(next_marker) | 210 next_url = self.GetListingURL(next_marker) |
211 (new_revisions, next_marker) = _FetchAndParse(next_url) | 211 (new_revisions, next_marker) = _FetchAndParse(next_url) |
212 revisions.extend(new_revisions) | 212 revisions.extend(new_revisions) |
213 return revisions | 213 return revisions |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 print 'BLINK CHANGELOG URL:' | 751 print 'BLINK CHANGELOG URL:' |
752 print ' ' + BLINK_CHANGELOG_URL % (max_blink_rev, min_blink_rev) | 752 print ' ' + BLINK_CHANGELOG_URL % (max_blink_rev, min_blink_rev) |
753 print 'CHANGELOG URL:' | 753 print 'CHANGELOG URL:' |
754 if opts.official_builds: | 754 if opts.official_builds: |
755 print OFFICIAL_CHANGELOG_URL % (min_chromium_rev, max_chromium_rev) | 755 print OFFICIAL_CHANGELOG_URL % (min_chromium_rev, max_chromium_rev) |
756 else: | 756 else: |
757 print ' ' + CHANGELOG_URL % (min_chromium_rev, max_chromium_rev) | 757 print ' ' + CHANGELOG_URL % (min_chromium_rev, max_chromium_rev) |
758 | 758 |
759 if __name__ == '__main__': | 759 if __name__ == '__main__': |
760 sys.exit(main()) | 760 sys.exit(main()) |
OLD | NEW |