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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/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 | « sandbox/win/PRESUBMIT.py ('k') | ui/file_manager/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) 2016 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2016 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 gpu. 5 """Top-level presubmit script for Source/modules/webgl.
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
11
12 import re
13
14
15 def PostUploadHook(cl, change, output_api): 11 def PostUploadHook(cl, change, output_api):
16 """git cl upload will call this hook after the issue is created/modified. 12 """git cl upload will call this hook after the issue is created/modified.
17 13
18 This hook adds extra try bots list to the CL description in order to run 14 This hook modifies the CL description in order to run extra GPU
19 extra GPU tests in addition to CQ try bots. 15 tests (in particular, the WebGL 2.0 conformance tests) in addition
16 to the regular CQ try bots. This test suite is too large to run
17 against all Chromium commits, but should be run against changes
18 likely to affect these tests.
20 """ 19 """
21 rietveld_obj = cl.RpcServer() 20 return output_api.EnsureCQIncludeTrybotsAreAdded(
22 issue = cl.issue 21 cl,
23 description = rietveld_obj.get_description(issue) 22 ['master.tryserver.chromium.linux:linux_optional_gpu_tests_rel',
24 if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I): 23 'master.tryserver.chromium.mac:mac_optional_gpu_tests_rel',
25 return [] 24 'master.tryserver.chromium.win:win_optional_gpu_tests_rel'],
26 25 'Automatically added optional GPU tests to run on CQ.')
27 bots = [
28 'master.tryserver.chromium.linux:linux_optional_gpu_tests_rel',
29 'master.tryserver.chromium.mac:mac_optional_gpu_tests_rel',
30 'master.tryserver.chromium.win:win_optional_gpu_tests_rel',
31 ]
32
33 results = []
34 new_description = description
35 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots)
36 results.append(output_api.PresubmitNotifyResult(
37 'Automatically added optional GPU tests to run on CQ.'))
38
39 if new_description != description:
40 rietveld_obj.update_description(issue, new_description)
41
42 return results
OLDNEW
« no previous file with comments | « sandbox/win/PRESUBMIT.py ('k') | ui/file_manager/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698