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

Side by Side Diff: cc/PRESUBMIT.py

Issue 1142393002: cc: Adding presubmit to include blink tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | no next file » | 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 results += FindUselessIfdefs(input_api, output_api) 326 results += FindUselessIfdefs(input_api, output_api)
327 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) 327 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
328 return results 328 return results
329 329
330 def GetPreferredTryMasters(project, change): 330 def GetPreferredTryMasters(project, change):
331 return { 331 return {
332 'tryserver.blink': { 332 'tryserver.blink': {
333 'linux_blink_rel': set(['defaulttests']), 333 'linux_blink_rel': set(['defaulttests']),
334 }, 334 },
335 } 335 }
336
337 def PostUploadHook(cl, change, output_api):
338 """git cl upload will call this hook after the issue is created/modified.
339
340 This hook adds extra try bots list to the CL description in order to run
341 Blink tests in addition to CQ try bots.
342 """
343 rietveld_obj = cl.RpcServer()
344 issue = cl.issue
345 original_description = rietveld_obj.get_description(issue)
346 if re.search(
347 r'^CQ_INCLUDE_TRYBOTS=.*', original_description, re.M | re.I):
348 return []
349
350 results = []
351 bots = [
352 'linux_blink_rel',
353 'mac_blink_rel',
danakj 2015/05/20 21:05:26 Do you think we benefit much from adding mac/win h
mithro-old 2015/05/21 05:26:57 We decided to just use linux_blink_rel for now.
354 'win_blink_rel',
355 ]
356 bots = ['tryserver.blink:%s' % s for s in bots]
357 bots_string = ';'.join(bots)
358 description = original_description
359 description += '\nCQ_INCLUDE_TRYBOTS=%s' % bots_string
360 results.append(output_api.PresubmitNotifyResult(
361 'Automatically added Perf trybots to run Blink tests on CQ.'))
362
363 if description != original_description:
364 rietveld_obj.update_description(issue, description)
Noel Gordon 2015/05/21 05:15:34 nit: indent 2
mithro-old 2015/05/21 05:26:57 Done.
365
366 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698