| OLD | NEW |
| 1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Presubmit script for changes affecting tools/perf/. | 5 """Presubmit script for changes affecting tools/perf/. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 for more details about the presubmit API built into depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 rietveld_obj = cl.RpcServer() | 112 rietveld_obj = cl.RpcServer() |
| 113 issue = cl.issue | 113 issue = cl.issue |
| 114 original_description = rietveld_obj.get_description(issue) | 114 original_description = rietveld_obj.get_description(issue) |
| 115 if not benchmarks_modified or re.search( | 115 if not benchmarks_modified or re.search( |
| 116 r'^CQ_EXTRA_TRYBOTS=.*', original_description, re.M | re.I): | 116 r'^CQ_EXTRA_TRYBOTS=.*', original_description, re.M | re.I): |
| 117 return [] | 117 return [] |
| 118 | 118 |
| 119 results = [] | 119 results = [] |
| 120 bots = [ | 120 bots = [ |
| 121 'linux_perf_bisect', | 121 'linux_perf_bisect', |
| 122 'mac_perf_bisect', | 122 'mac_10_10_perf_bisect', |
| 123 'win_perf_bisect', | 123 'win_perf_bisect', |
| 124 'android_nexus5_perf_bisect' | 124 'android_nexus5_perf_bisect' |
| 125 ] | 125 ] |
| 126 bots = ['tryserver.chromium.perf:%s' % s for s in bots] | 126 bots = ['tryserver.chromium.perf:%s' % s for s in bots] |
| 127 bots_string = ';'.join(bots) | 127 bots_string = ';'.join(bots) |
| 128 description = original_description | 128 description = original_description |
| 129 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string | 129 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string |
| 130 results.append(output_api.PresubmitNotifyResult( | 130 results.append(output_api.PresubmitNotifyResult( |
| 131 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) | 131 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) |
| 132 | 132 |
| 133 if description != original_description: | 133 if description != original_description: |
| 134 rietveld_obj.update_description(issue, description) | 134 rietveld_obj.update_description(issue, description) |
| 135 | 135 |
| 136 return results | 136 return results |
| OLD | NEW |