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

Side by Side Diff: components/cronet/PRESUBMIT.py

Issue 2680413002: Turn on clang format as an upload step for all the repo. (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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 src/components/cronet. 5 """Top-level presubmit script for src/components/cronet.
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 73
74 def _RunUnittests(input_api, output_api): 74 def _RunUnittests(input_api, output_api):
75 return input_api.canned_checks.RunUnitTestsInDirectory( 75 return input_api.canned_checks.RunUnitTestsInDirectory(
76 input_api, output_api, '.', [ r'^.+_unittest\.py$']) 76 input_api, output_api, '.', [ r'^.+_unittest\.py$'])
77 77
78 78
79 def CheckChangeOnUpload(input_api, output_api): 79 def CheckChangeOnUpload(input_api, output_api):
80 results = [] 80 results = []
81 results.extend(_PyLintChecks(input_api, output_api)) 81 results.extend(_PyLintChecks(input_api, output_api))
82 results.extend(
83 input_api.canned_checks.CheckPatchFormatted(input_api, output_api))
84 results.extend(_PackageChecks(input_api, output_api)) 82 results.extend(_PackageChecks(input_api, output_api))
85 results.extend(_RunUnittests(input_api, output_api)) 83 results.extend(_RunUnittests(input_api, output_api))
86 return results 84 return results
87 85
88 86
89 def CheckChangeOnCommit(input_api, output_api): 87 def CheckChangeOnCommit(input_api, output_api):
90 return _RunUnittests(input_api, output_api) 88 return _RunUnittests(input_api, output_api)
91 89
92 90
93 def _GetTryMasters(project, change): 91 def _GetTryMasters(project, change):
(...skipping 30 matching lines...) Expand all
124 new_description = description 122 new_description = description
125 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join( 123 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(
126 '%s:%s' % (master, ','.join(bots)) 124 '%s:%s' % (master, ','.join(bots))
127 for master, bots in masters.iteritems()) 125 for master, bots in masters.iteritems())
128 results.append(output_api.PresubmitNotifyResult( 126 results.append(output_api.PresubmitNotifyResult(
129 'Automatically added Cronet trybot to run tests on CQ.')) 127 'Automatically added Cronet trybot to run tests on CQ.'))
130 128
131 rietveld_obj.update_description(issue, new_description) 129 rietveld_obj.update_description(issue, new_description)
132 130
133 return results 131 return results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698