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

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 303513002: Initial work towards public Android recipes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.py » ('j') | scripts/slave/recipes/chromium.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import os 5 import os
6 6
7 from slave import recipe_api 7 from slave import recipe_api
8 8
9 class AndroidApi(recipe_api.RecipeApi): 9 class AndroidApi(recipe_api.RecipeApi):
10 def __init__(self, **kwargs): 10 def __init__(self, **kwargs):
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 [self.m.path['build'].join('scripts', 'slave', 'apply_svn_patch.py'), 193 [self.m.path['build'].join('scripts', 'slave', 'apply_svn_patch.py'),
194 '-p', self.m.properties['patch_url'], 194 '-p', self.m.properties['patch_url'],
195 '-r', self.internal_dir]) 195 '-r', self.internal_dir])
196 196
197 def compile(self, **kwargs): 197 def compile(self, **kwargs):
198 assert 'env' not in kwargs, ( 198 assert 'env' not in kwargs, (
199 "chromium_andoid compile clobbers env in keyword arguments") 199 "chromium_andoid compile clobbers env in keyword arguments")
200 kwargs['env'] = self.get_env() 200 kwargs['env'] = self.get_env()
201 return self.m.chromium.compile(**kwargs) 201 return self.m.chromium.compile(**kwargs)
202 202
203 def findbugs(self):
204 cmd = [self.m.path['checkout'].join('build', 'android', 'findbugs_diff.py')]
205 if self.m.chromium.c.BUILD_CONFIG == 'Release':
206 cmd.append('--release-build')
207 yield self.m.step('findbugs', cmd, env=self.get_env())
208
209 # If findbugs fails, there could be stale class files. Delete them, and
210 # next run maybe we'll do better.
211 if self.m.step_history.last_step().retcode != 0:
212 yield self.m.path.rmwildcard(
213 '*.class',
214 self.m.path['checkout'].join('out'),
Michael Achenbach 2014/05/28 14:23:27 Just to make sure: The files are not in e.g. out/R
Paweł Hajdan Jr. 2014/05/30 09:49:00 I don't know, this is just restoring public versio
215 always_run=True)
216
217 cmd = [self.m.path['checkout'].join('tools', 'android', 'findbugs_plugin',
218 'test', 'run_findbugs_plugin_tests.py')]
219 if self.m.chromium.c.BUILD_CONFIG == 'Release':
220 cmd.append('--release-build')
221 yield self.m.step('findbugs_tests', cmd, env=self.get_env())
222
223 def checklicenses(self):
224 yield self.m.step(
225 'check_licenses',
226 [self.m.path['checkout'].join('android_webview', 'tools',
227 'webview_licenses.py'),
228 'scan'],
229 env=self.get_env())
230
203 def git_number(self): 231 def git_number(self):
204 yield self.m.step( 232 yield self.m.step(
205 'git_number', 233 'git_number',
206 [self.m.path['depot_tools'].join('git_number.py')], 234 [self.m.path['depot_tools'].join('git_number.py')],
207 stdout = self.m.raw_io.output(), 235 stdout = self.m.raw_io.output(),
208 step_test_data=( 236 step_test_data=(
209 lambda: 237 lambda:
210 self.m.raw_io.test_api.stream_output('3000\n') 238 self.m.raw_io.test_api.stream_output('3000\n')
211 ), 239 ),
212 cwd=self.m.path['checkout']) 240 cwd=self.m.path['checkout'])
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 291
264 292
265 def spawn_logcat_monitor(self): 293 def spawn_logcat_monitor(self):
266 return self.m.step( 294 return self.m.step(
267 'spawn_logcat_monitor', 295 'spawn_logcat_monitor',
268 [self.m.path['build'].join('scripts', 'slave', 'daemonizer.py'), 296 [self.m.path['build'].join('scripts', 'slave', 'daemonizer.py'),
269 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'), 297 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'),
270 self.m.chromium.c.build_dir.join('logcat')], 298 self.m.chromium.c.build_dir.join('logcat')],
271 env=self.get_env(), can_fail_build=False) 299 env=self.get_env(), can_fail_build=False)
272 300
273 def device_status_check(self, restart_usb=False): 301 def device_status_check(self, restart_usb=False, **kwargs):
274 args = [] 302 args = []
275 if restart_usb: 303 if restart_usb:
276 args = ['--restart-usb'] 304 args = ['--restart-usb']
277 yield self.m.step( 305 yield self.m.step(
278 'device_status_check', 306 'device_status_check',
279 [self.m.path['checkout'].join('build', 'android', 'buildbot', 307 [self.m.path['checkout'].join('build', 'android', 'buildbot',
280 'bb_device_status_check.py')] + args, 308 'bb_device_status_check.py')] + args,
281 env=self.get_env()) 309 env=self.get_env(),
310 **kwargs)
282 311
283 def provision_devices(self): 312 def provision_devices(self, **kwargs):
284 yield self.m.python( 313 yield self.m.python(
285 'provision_devices', 314 'provision_devices',
286 self.m.path['checkout'].join( 315 self.m.path['checkout'].join(
287 'build', 'android', 'provision_devices.py'), 316 'build', 'android', 'provision_devices.py'),
288 args=['-t', self.m.chromium.c.BUILD_CONFIG], 317 args=['-t', self.m.chromium.c.BUILD_CONFIG],
289 can_fail_build=False) 318 can_fail_build=False,
319 **kwargs)
290 320
291 def detect_and_setup_devices(self): 321 def detect_and_setup_devices(self):
292 yield self.device_status_check() 322 yield self.device_status_check()
293 yield self.provision_devices() 323 yield self.provision_devices()
294 324
295 if self.c.INTERNAL: 325 if self.c.INTERNAL:
296 yield self.m.step( 326 yield self.m.step(
297 'setup_devices_for_testing', 327 'setup_devices_for_testing',
298 [self.internal_dir.join('build', 'setup_device_testing.py')], 328 [self.internal_dir.join('build', 'setup_device_testing.py')],
299 env=self.get_env(), can_fail_build=False) 329 env=self.get_env(), can_fail_build=False)
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 567
538 yield self.m.gsutil.upload( 568 yield self.m.gsutil.upload(
539 source=self.coverage_dir.join('coverage_html'), 569 source=self.coverage_dir.join('coverage_html'),
540 bucket='chrome-code-coverage', 570 bucket='chrome-code-coverage',
541 dest=gs_dest, 571 dest=gs_dest,
542 args=['-R'], 572 args=['-R'],
543 name='upload coverage report', 573 name='upload coverage report',
544 link_name='Coverage report', 574 link_name='Coverage report',
545 always_run=True, 575 always_run=True,
546 **kwargs) 576 **kwargs)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.py » ('j') | scripts/slave/recipes/chromium.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698