OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 self.good_revision = good_revision | 46 self.good_revision = good_revision |
47 self.bad_revision = bad_revision | 47 self.bad_revision = bad_revision |
48 | 48 |
49 # The name of the ZIP file in a revision directory on the server. | 49 # The name of the ZIP file in a revision directory on the server. |
50 self.archive_name = None | 50 self.archive_name = None |
51 | 51 |
52 # Set some internal members: | 52 # Set some internal members: |
53 # _listing_platform_dir = Directory that holds revisions. Ends with a '/'. | 53 # _listing_platform_dir = Directory that holds revisions. Ends with a '/'. |
54 # _archive_extract_dir = Uncompressed directory in the archive_name file. | 54 # _archive_extract_dir = Uncompressed directory in the archive_name file. |
55 # _binary_name = The name of the executable to run. | 55 # _binary_name = The name of the executable to run. |
56 if self.platform == 'linux' or self.platform == 'linux-64': | 56 if self.platform == 'linux' or self.platform == 'linux64': |
57 self._listing_platform_dir = 'Linux/' | 57 self._listing_platform_dir = 'Linux/' |
58 self.archive_name = 'chrome-linux.zip' | 58 self.archive_name = 'chrome-linux.zip' |
59 self._archive_extract_dir = 'chrome-linux' | 59 self._archive_extract_dir = 'chrome-linux' |
60 self._binary_name = 'chrome' | 60 self._binary_name = 'chrome' |
61 # Linux and x64 share all the same path data except for the archive dir. | 61 # Linux and x64 share all the same path data except for the archive dir. |
62 if self.platform == 'linux-64': | 62 if self.platform == 'linux64': |
63 self._listing_platform_dir = 'Linux_x64/' | 63 self._listing_platform_dir = 'Linux_x64/' |
64 elif self.platform == 'mac': | 64 elif self.platform == 'mac': |
65 self._listing_platform_dir = 'Mac/' | 65 self._listing_platform_dir = 'Mac/' |
66 self.archive_name = 'chrome-mac.zip' | 66 self.archive_name = 'chrome-mac.zip' |
67 self._archive_extract_dir = 'chrome-mac' | 67 self._archive_extract_dir = 'chrome-mac' |
68 self._binary_name = 'Chromium.app/Contents/MacOS/Chromium' | 68 self._binary_name = 'Chromium.app/Contents/MacOS/Chromium' |
69 elif self.platform == 'win': | 69 elif self.platform == 'win': |
70 self._listing_platform_dir = 'Win/' | 70 self._listing_platform_dir = 'Win/' |
71 self.archive_name = 'chrome-win32.zip' | 71 self.archive_name = 'chrome-win32.zip' |
72 self._archive_extract_dir = 'chrome-win32' | 72 self._archive_extract_dir = 'chrome-win32' |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 | 355 |
356 # We're done. Let the user know the results in an official manner. | 356 # We're done. Let the user know the results in an official manner. |
357 print('You are probably looking for build %d.' % revlist[bad]) | 357 print('You are probably looking for build %d.' % revlist[bad]) |
358 print('CHANGELOG URL:') | 358 print('CHANGELOG URL:') |
359 print(CHANGELOG_URL % (last_known_good_rev, revlist[bad])) | 359 print(CHANGELOG_URL % (last_known_good_rev, revlist[bad])) |
360 print('Built at revision:') | 360 print('Built at revision:') |
361 print(BUILD_VIEWVC_URL % revlist[bad]) | 361 print(BUILD_VIEWVC_URL % revlist[bad]) |
362 | 362 |
363 if __name__ == '__main__': | 363 if __name__ == '__main__': |
364 sys.exit(main()) | 364 sys.exit(main()) |
OLD | NEW |