| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 """Top-level presubmit script for cc. | 5 """Top-level presubmit script for cc. |
| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 This hook adds extra try bots list to the CL description in order to run | 332 This hook adds extra try bots list to the CL description in order to run |
| 333 Blink tests in addition to CQ try bots. | 333 Blink tests in addition to CQ try bots. |
| 334 """ | 334 """ |
| 335 rietveld_obj = cl.RpcServer() | 335 rietveld_obj = cl.RpcServer() |
| 336 issue = cl.issue | 336 issue = cl.issue |
| 337 description = rietveld_obj.get_description(issue) | 337 description = rietveld_obj.get_description(issue) |
| 338 if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I): | 338 if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I): |
| 339 return [] | 339 return [] |
| 340 | 340 |
| 341 bots = [ | 341 bots = [ |
| 342 'master.tryserver.blink:linux_precise_blink_rel', | 342 'master.tryserver.blink:linux_trusty_blink_rel', |
| 343 ] | 343 ] |
| 344 | 344 |
| 345 results = [] | 345 results = [] |
| 346 new_description = description | 346 new_description = description |
| 347 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots) | 347 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots) |
| 348 results.append(output_api.PresubmitNotifyResult( | 348 results.append(output_api.PresubmitNotifyResult( |
| 349 'Automatically added Blink trybots to run Blink tests on CQ.')) | 349 'Automatically added Blink trybots to run Blink tests on CQ.')) |
| 350 | 350 |
| 351 if new_description != description: | 351 if new_description != description: |
| 352 rietveld_obj.update_description(issue, new_description) | 352 rietveld_obj.update_description(issue, new_description) |
| 353 | 353 |
| 354 return results | 354 return results |
| OLD | NEW |