Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: cc/PRESUBMIT.py

Issue 2683103002: Rewrite presubmit scripts to use new EnsureCQIncludeTrybotsAreAdded. (Closed)
Patch Set: Worked around unrelated presubmit failure under cronet. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/win/PRESUBMIT.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 results += CheckDoubleAngles(input_api, output_api) 321 results += CheckDoubleAngles(input_api, output_api)
322 results += CheckUniquePtr(input_api, output_api) 322 results += CheckUniquePtr(input_api, output_api)
323 results += CheckNamespace(input_api, output_api) 323 results += CheckNamespace(input_api, output_api)
324 results += CheckForUseOfWrongClock(input_api, output_api) 324 results += CheckForUseOfWrongClock(input_api, output_api)
325 results += FindUselessIfdefs(input_api, output_api) 325 results += FindUselessIfdefs(input_api, output_api)
326 return results 326 return results
327 327
328 def PostUploadHook(cl, change, output_api): 328 def PostUploadHook(cl, change, output_api):
329 """git cl upload will call this hook after the issue is created/modified. 329 """git cl upload will call this hook after the issue is created/modified.
330 330
331 This hook adds extra try bots list to the CL description in order to run 331 This hook adds an extra try bot list to the CL description in order to run
332 Blink tests in addition to CQ try bots. 332 Blink tests in addition to the CQ try bots.
333 """ 333 """
334 rietveld_obj = cl.RpcServer() 334 return output_api.EnsureCQIncludeTrybotsAreAdded(
335 issue = cl.issue 335 cl,
336 description = rietveld_obj.get_description(issue) 336 ['master.tryserver.blink:linux_trusty_blink_rel'],
337 if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I): 337 'Automatically added Blink trybots to run Blink tests on CQ.')
338 return []
339
340 bots = [
341 'master.tryserver.blink:linux_trusty_blink_rel',
342 ]
343
344 results = []
345 new_description = description
346 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots)
347 results.append(output_api.PresubmitNotifyResult(
348 'Automatically added Blink trybots to run Blink tests on CQ.'))
349
350 if new_description != description:
351 rietveld_obj.update_description(issue, new_description)
352
353 return results
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/win/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698