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 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2473 and good_state.passed not in ('Skipped', 'Build Failed') | 2473 and good_state.passed not in ('Skipped', 'Build Failed') |
2474 and bad_state.passed not in ('Skipped', 'Build Failed')): | 2474 and bad_state.passed not in ('Skipped', 'Build Failed')): |
2475 for state in (good_state, bad_state): | 2475 for state in (good_state, bad_state): |
2476 run_results = self.RunTest( | 2476 run_results = self.RunTest( |
2477 state.revision, | 2477 state.revision, |
2478 state.depot, | 2478 state.depot, |
2479 command_to_run, | 2479 command_to_run, |
2480 metric, | 2480 metric, |
2481 test_run_multiplier=BORDER_REVISIONS_EXTRA_RUNS) | 2481 test_run_multiplier=BORDER_REVISIONS_EXTRA_RUNS) |
2482 # Is extend the right thing to do here? | 2482 # Is extend the right thing to do here? |
2483 state.value['values'].extend(run_results[0]['values']) | 2483 if run_results[1] != BUILD_RESULT_FAIL: |
| 2484 state.value['values'].extend(run_results[0]['values']) |
| 2485 else: |
| 2486 warning_text = 'Re-test of revision %s failed with error message: %s' |
| 2487 warning_text %= (state.revision, run_results[0]) |
| 2488 if warning_text not in self.warnings: |
| 2489 self.warnings.append(warning_text) |
2484 | 2490 |
2485 | 2491 |
2486 def _IsPlatformSupported(): | 2492 def _IsPlatformSupported(): |
2487 """Checks that this platform and build system are supported. | 2493 """Checks that this platform and build system are supported. |
2488 | 2494 |
2489 Args: | 2495 Args: |
2490 opts: The options parsed from the command line. | 2496 opts: The options parsed from the command line. |
2491 | 2497 |
2492 Returns: | 2498 Returns: |
2493 True if the platform and build system are supported. | 2499 True if the platform and build system are supported. |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2850 # bugs. If you change this, please update the perf dashboard as well. | 2856 # bugs. If you change this, please update the perf dashboard as well. |
2851 bisect_utils.OutputAnnotationStepStart('Results') | 2857 bisect_utils.OutputAnnotationStepStart('Results') |
2852 print 'Runtime Error: %s' % e | 2858 print 'Runtime Error: %s' % e |
2853 if opts.output_buildbot_annotations: | 2859 if opts.output_buildbot_annotations: |
2854 bisect_utils.OutputAnnotationStepClosed() | 2860 bisect_utils.OutputAnnotationStepClosed() |
2855 return 1 | 2861 return 1 |
2856 | 2862 |
2857 | 2863 |
2858 if __name__ == '__main__': | 2864 if __name__ == '__main__': |
2859 sys.exit(main()) | 2865 sys.exit(main()) |
OLD | NEW |