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

Side by Side Diff: tools/auto_bisect/builder.py

Issue 529593002: In the presubmit for auto-bisect, run pylint and unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « tools/auto_bisect/PRESUBMIT.py ('k') | tools/auto_bisect/run_tests » ('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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """Classes and functions for building Chrome. 5 """Classes and functions for building Chrome.
6 6
7 This includes functions for running commands to build, as well as 7 This includes functions for running commands to build, as well as
8 specific rules about which targets to build. 8 specific rules about which targets to build.
9 """ 9 """
10 10
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 assert False, 'No build system defined.' 135 assert False, 'No build system defined.'
136 return build_success 136 return build_success
137 137
138 138
139 class AndroidBuilder(Builder): 139 class AndroidBuilder(Builder):
140 """AndroidBuilder is used to build on android.""" 140 """AndroidBuilder is used to build on android."""
141 141
142 def __init__(self, opts): 142 def __init__(self, opts):
143 super(AndroidBuilder, self).__init__(opts) 143 super(AndroidBuilder, self).__init__(opts)
144 144
145 # TODO(qyearsley): Make this a class method and verify that it works with
146 # a unit test.
147 # pylint: disable=R0201
145 def _GetTargets(self): 148 def _GetTargets(self):
146 """Returns a list of build targets.""" 149 """Returns a list of build targets."""
147 return ['chrome_shell_apk', 'cc_perftests_apk', 'android_tools'] 150 return ['chrome_shell_apk', 'cc_perftests_apk', 'android_tools']
148 151
149 def Build(self, depot, opts): 152 def Build(self, depot, opts):
150 """Builds the android content shell and other necessary tools. 153 """Builds the android content shell and other necessary tools.
151 154
152 Args: 155 Args:
153 depot: Current depot being bisected. 156 depot: Current depot being bisected.
154 opts: The options parsed from the command line. 157 opts: The options parsed from the command line.
(...skipping 17 matching lines...) Expand all
172 175
173 class AndroidChromeBuilder(AndroidBuilder): 176 class AndroidChromeBuilder(AndroidBuilder):
174 """AndroidChromeBuilder is used to build "android-chrome". 177 """AndroidChromeBuilder is used to build "android-chrome".
175 178
176 This is slightly different from AndroidBuilder. 179 This is slightly different from AndroidBuilder.
177 """ 180 """
178 181
179 def __init__(self, opts): 182 def __init__(self, opts):
180 super(AndroidChromeBuilder, self).__init__(opts) 183 super(AndroidChromeBuilder, self).__init__(opts)
181 184
185 # TODO(qyearsley): Make this a class method and verify that it works with
186 # a unit test.
187 # pylint: disable=R0201
182 def _GetTargets(self): 188 def _GetTargets(self):
183 """Returns a list of build targets.""" 189 """Returns a list of build targets."""
184 return AndroidBuilder._GetTargets(self) + ['chrome_apk'] 190 return AndroidBuilder._GetTargets(self) + ['chrome_apk']
185 191
186 192
187 class CrosBuilder(Builder): 193 class CrosBuilder(Builder):
188 """CrosBuilder is used to build and image ChromeOS/Chromium. 194 """CrosBuilder is used to build and image ChromeOS/Chromium.
189 195
190 WARNING(qyearsley, 2014-08-15): This hasn't been tested recently. 196 WARNING(qyearsley, 2014-08-15): This hasn't been tested recently.
191 """ 197 """
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 # (See http://crrev.com/170273005). So, we set this variable explicitly here 447 # (See http://crrev.com/170273005). So, we set this variable explicitly here
442 # in order to build Chrome on Android. 448 # in order to build Chrome on Android.
443 if 'GYP_DEFINES' not in os.environ: 449 if 'GYP_DEFINES' not in os.environ:
444 os.environ['GYP_DEFINES'] = 'OS=android' 450 os.environ['GYP_DEFINES'] = 'OS=android'
445 else: 451 else:
446 os.environ['GYP_DEFINES'] += ' OS=android' 452 os.environ['GYP_DEFINES'] += ' OS=android'
447 453
448 if opts.use_goma: 454 if opts.use_goma:
449 os.environ['GYP_DEFINES'] += ' use_goma=1' 455 os.environ['GYP_DEFINES'] += ' use_goma=1'
450 return not proc.returncode 456 return not proc.returncode
OLDNEW
« no previous file with comments | « tools/auto_bisect/PRESUBMIT.py ('k') | tools/auto_bisect/run_tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698