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

Side by Side Diff: chrome/browser/win/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 | « cc/PRESUBMIT.py ('k') | chrome_elf/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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 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 """Presubmit script for chrome/browser/win. 5 """Presubmit script for chrome/browser/win.
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 import re 11 import re
12 12
13 def PostUploadHook(cl, change, output_api): 13 def PostUploadHook(cl, change, output_api):
14 """git cl upload will call this hook after the issue is created/modified. 14 """git cl upload will call this hook after the issue is created/modified.
15 15
16 This hook adds extra try bots list to the CL description in order to run 16 This hook adds extra try bots list to the CL description in order to run
17 tests on the Windows 10 try bot in addition to CQ try bots. 17 tests on the Windows 10 try bot in addition to CQ try bots.
18 """ 18 """
19 rietveld_obj = cl.RpcServer() 19 return output_api.EnsureCQIncludeTrybotsAreAdded(
20 issue = cl.issue 20 cl,
21 description = rietveld_obj.get_description(issue) 21 [
22 if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I): 22 'master.tryserver.chromium.win:win10_chromium_x64_rel_ng',
23 return [] 23 ],
24 24 'Automatically added Win10 bot to run on CQ.')
25 bots = [
26 'master.tryserver.chromium.win:win10_chromium_x64_rel_ng',
27 ]
28
29 results = []
30 new_description = description
31 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots)
32 results.append(output_api.PresubmitNotifyResult(
33 'Automatically added Win10 bot to run on CQ.'))
34
35 if new_description != description:
36 rietveld_obj.update_description(issue, new_description)
37
38 return results
OLDNEW
« no previous file with comments | « cc/PRESUBMIT.py ('k') | chrome_elf/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698