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

Side by Side Diff: content/browser/frame_host/PRESUBMIT.py

Issue 2701603004: Convert remaining PostUploadHooks to use EnsureCQIncludeTrybotsAreAdded. (Closed)
Patch Set: 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 | « chrome/browser/resources/PRESUBMIT.py ('k') | services/shape_detection/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 """Presubmit script for //content/browser/frame_host. 4 """Presubmit script for //content/browser/frame_host.
5 5
6 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 6 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
7 for more details about the presubmit API built into depot_tools. 7 for more details about the presubmit API built into depot_tools.
8 """ 8 """
9 9
10 import re 10 import re
(...skipping 15 matching lines...) Expand all
26 # out a way to augment the default set. 26 # out a way to augment the default set.
27 return {} 27 return {}
28 28
29 29
30 def PostUploadHook(cl, change, output_api): 30 def PostUploadHook(cl, change, output_api):
31 """git cl upload will call this hook after the issue is created/modified. 31 """git cl upload will call this hook after the issue is created/modified.
32 32
33 This hook adds extra try bots to the CL description in order to run site 33 This hook adds extra try bots to the CL description in order to run site
34 isolation tests in addition to CQ try bots. 34 isolation tests in addition to CQ try bots.
35 """ 35 """
36 rietveld_obj = cl.RpcServer() 36 return output_api.EnsureCQIncludeTrybotsAreAdded(
37 issue = cl.issue 37 cl,
38 description = rietveld_obj.get_description(issue) 38 [
39 if re.search(r'^CQ_INCLUDE_TRYBOTS=.*', description, re.M | re.I): 39 'master.tryserver.chromium.linux:linux_site_isolation'
40 return [] 40 ],
41 41 'Automatically added site isolation trybots to run tests on CQ.')
42 masters = _GetTryMasters(None, change)
43 results = []
44 new_description = description
45 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(
46 '%s:%s' % (master, ','.join(bots))
47 for master, bots in masters.iteritems())
48 results.append(output_api.PresubmitNotifyResult(
49 'Automatically added site isolation trybots to run tests on CQ.'))
50
51 rietveld_obj.update_description(issue, new_description)
52
53 return results
OLDNEW
« no previous file with comments | « chrome/browser/resources/PRESUBMIT.py ('k') | services/shape_detection/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698