| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 """Chromium auto-bisect tool | 6 """Chromium auto-bisect tool |
| 7 | 7 |
| 8 This script bisects a range of commits using binary search. It starts by getting | 8 This script bisects a range of commits using binary search. It starts by getting |
| 9 reference values for the specified "good" and "bad" commits. Then, for revisions | 9 reference values for the specified "good" and "bad" commits. Then, for revisions |
| 10 in between, it will get builds, run tests and classify intermediate revisions as | 10 in between, it will get builds, run tests and classify intermediate revisions as |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 # The script is in chromium/src/tools/auto_bisect. Throughout this script, | 71 # The script is in chromium/src/tools/auto_bisect. Throughout this script, |
| 72 # we use paths to other things in the chromium/src repository. | 72 # we use paths to other things in the chromium/src repository. |
| 73 | 73 |
| 74 # Possible return values from BisectPerformanceMetrics.RunTest. | 74 # Possible return values from BisectPerformanceMetrics.RunTest. |
| 75 BUILD_RESULT_SUCCEED = 0 | 75 BUILD_RESULT_SUCCEED = 0 |
| 76 BUILD_RESULT_FAIL = 1 | 76 BUILD_RESULT_FAIL = 1 |
| 77 BUILD_RESULT_SKIPPED = 2 | 77 BUILD_RESULT_SKIPPED = 2 |
| 78 | 78 |
| 79 # The confidence percentage we require to consider the initial range a | 79 # The confidence percentage we require to consider the initial range a |
| 80 # regression based on the test results of the inital good and bad revisions. | 80 # regression based on the test results of the initial good and bad revisions. |
| 81 REGRESSION_CONFIDENCE = 80 | 81 REGRESSION_CONFIDENCE = 80 |
| 82 # How many times to repeat the test on the last known good and first known bad | 82 # How many times to repeat the test on the last known good and first known bad |
| 83 # revisions in order to assess a more accurate confidence score in the | 83 # revisions in order to assess a more accurate confidence score in the |
| 84 # regression culprit. | 84 # regression culprit. |
| 85 BORDER_REVISIONS_EXTRA_RUNS = 2 | 85 BORDER_REVISIONS_EXTRA_RUNS = 2 |
| 86 | 86 |
| 87 # Patch template to add a new file, DEPS.sha under src folder. | 87 # Patch template to add a new file, DEPS.sha under src folder. |
| 88 # This file contains SHA1 value of the DEPS changes made while bisecting | 88 # This file contains SHA1 value of the DEPS changes made while bisecting |
| 89 # dependency repositories. This patch send along with DEPS patch to try server. | 89 # dependency repositories. This patch send along with DEPS patch to try server. |
| 90 # When a build requested is posted with a patch, bisect builders on try server, | 90 # When a build requested is posted with a patch, bisect builders on try server, |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 fetch_build_func, builder_name, self.opts.builder_type, | 922 fetch_build_func, builder_name, self.opts.builder_type, |
| 923 build_request_id, build_timeout) | 923 build_request_id, build_timeout) |
| 924 if not archive_filename: | 924 if not archive_filename: |
| 925 logging.warn('%s [revision: %s]', error_msg, git_revision) | 925 logging.warn('%s [revision: %s]', error_msg, git_revision) |
| 926 return archive_filename | 926 return archive_filename |
| 927 | 927 |
| 928 def _UnzipAndMoveBuildProducts(self, downloaded_file, build_dir, | 928 def _UnzipAndMoveBuildProducts(self, downloaded_file, build_dir, |
| 929 build_type='Release'): | 929 build_type='Release'): |
| 930 """Unzips the build archive and moves it to the build output directory. | 930 """Unzips the build archive and moves it to the build output directory. |
| 931 | 931 |
| 932 The build output directory is whereever the binaries are expected to | 932 The build output directory is wherever the binaries are expected to |
| 933 be in order to start Chrome and run tests. | 933 be in order to start Chrome and run tests. |
| 934 | 934 |
| 935 TODO: Simplify and clarify this method if possible. | 935 TODO: Simplify and clarify this method if possible. |
| 936 | 936 |
| 937 Args: | 937 Args: |
| 938 downloaded_file: File path of the downloaded zip file. | 938 downloaded_file: File path of the downloaded zip file. |
| 939 build_dir: Directory where the the zip file was downloaded to. | 939 build_dir: Directory where the the zip file was downloaded to. |
| 940 build_type: "Release" or "Debug". | 940 build_type: "Release" or "Debug". |
| 941 | 941 |
| 942 Returns: | 942 Returns: |
| (...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2815 # bugs. If you change this, please update the perf dashboard as well. | 2815 # bugs. If you change this, please update the perf dashboard as well. |
| 2816 bisect_utils.OutputAnnotationStepStart('Results') | 2816 bisect_utils.OutputAnnotationStepStart('Results') |
| 2817 print 'Runtime Error: %s' % e | 2817 print 'Runtime Error: %s' % e |
| 2818 if opts.output_buildbot_annotations: | 2818 if opts.output_buildbot_annotations: |
| 2819 bisect_utils.OutputAnnotationStepClosed() | 2819 bisect_utils.OutputAnnotationStepClosed() |
| 2820 return 1 | 2820 return 1 |
| 2821 | 2821 |
| 2822 | 2822 |
| 2823 if __name__ == '__main__': | 2823 if __name__ == '__main__': |
| 2824 sys.exit(main()) | 2824 sys.exit(main()) |
| OLD | NEW |