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 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2006 """ | 2006 """ |
2007 if self.opts.target_platform == 'android': | 2007 if self.opts.target_platform == 'android': |
2008 good_revision = source_control.GetCommitPosition(good_revision) | 2008 good_revision = source_control.GetCommitPosition(good_revision) |
2009 if (bisect_utils.IsStringInt(good_revision) | 2009 if (bisect_utils.IsStringInt(good_revision) |
2010 and good_revision < 265549): | 2010 and good_revision < 265549): |
2011 return {'error': ( | 2011 return {'error': ( |
2012 'Bisect cannot continue for the given revision range.\n' | 2012 'Bisect cannot continue for the given revision range.\n' |
2013 'It is impossible to bisect Android regressions ' | 2013 'It is impossible to bisect Android regressions ' |
2014 'prior to r265549, which allows the bisect bot to ' | 2014 'prior to r265549, which allows the bisect bot to ' |
2015 'rely on Telemetry to do apk installation of the most recently ' | 2015 'rely on Telemetry to do apk installation of the most recently ' |
2016 'built local ChromeShell(refer to crbug.com/385324).\n' | 2016 'built local ChromePublic (refer to crbug.com/385324).\n' |
2017 'Please try bisecting revisions greater than or equal to r265549.')} | 2017 'Please try bisecting revisions greater than or equal to r265549.')} |
2018 | 2018 |
2019 if bisect_utils.IsWindowsHost(): | 2019 if bisect_utils.IsWindowsHost(): |
2020 good_revision = source_control.GetCommitPosition(good_revision) | 2020 good_revision = source_control.GetCommitPosition(good_revision) |
2021 bad_revision = source_control.GetCommitPosition(bad_revision) | 2021 bad_revision = source_control.GetCommitPosition(bad_revision) |
2022 if (bisect_utils.IsStringInt(good_revision) and | 2022 if (bisect_utils.IsStringInt(good_revision) and |
2023 bisect_utils.IsStringInt(bad_revision)): | 2023 bisect_utils.IsStringInt(bad_revision)): |
2024 if (289987 <= good_revision < 290716 or | 2024 if (289987 <= good_revision < 290716 or |
2025 289987 <= bad_revision < 290716): | 2025 289987 <= bad_revision < 290716): |
2026 return {'error': ('Oops! Revision between r289987 and r290716 are ' | 2026 return {'error': ('Oops! Revision between r289987 and r290716 are ' |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2860 # bugs. If you change this, please update the perf dashboard as well. | 2860 # bugs. If you change this, please update the perf dashboard as well. |
2861 bisect_utils.OutputAnnotationStepStart('Results') | 2861 bisect_utils.OutputAnnotationStepStart('Results') |
2862 print 'Runtime Error: %s' % e | 2862 print 'Runtime Error: %s' % e |
2863 if opts.output_buildbot_annotations: | 2863 if opts.output_buildbot_annotations: |
2864 bisect_utils.OutputAnnotationStepClosed() | 2864 bisect_utils.OutputAnnotationStepClosed() |
2865 return 1 | 2865 return 1 |
2866 | 2866 |
2867 | 2867 |
2868 if __name__ == '__main__': | 2868 if __name__ == '__main__': |
2869 sys.exit(main()) | 2869 sys.exit(main()) |
OLD | NEW |