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

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: 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') | no next file with comments »
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 [self.m.path['build'].join('scripts', 'slave', 'apply_svn_patch.py'), 196 [self.m.path['build'].join('scripts', 'slave', 'apply_svn_patch.py'),
197 '-p', self.m.properties['patch_url'], 197 '-p', self.m.properties['patch_url'],
198 '-r', self.internal_dir]) 198 '-r', self.internal_dir])
199 199
200 def compile(self, **kwargs): 200 def compile(self, **kwargs):
201 assert 'env' not in kwargs, ( 201 assert 'env' not in kwargs, (
202 "chromium_andoid compile clobbers env in keyword arguments") 202 "chromium_andoid compile clobbers env in keyword arguments")
203 kwargs['env'] = self.get_env() 203 kwargs['env'] = self.get_env()
204 return self.m.chromium.compile(**kwargs) 204 return self.m.chromium.compile(**kwargs)
205 205
206 def findbugs(self): 206 def findbugs(self):
luqui 2014/05/27 18:39:35 This is going to conflict with this change once I
Paweł Hajdan Jr. 2014/05/28 12:53:21 Done.
207 assert self.c.INTERNAL, 'findbugs is only available on internal builds' 207 cmd = [self.m.path['checkout'].join('build', 'android', 'findbugs_diff.py')]
208 cmd = [ 208 if self.m.chromium.c.BUILD_CONFIG == 'Release':
209 self.m.path['checkout'].join('build', 'android', 'findbugs_diff.py'), 209 cmd.append('--release-build')
210 '-b', self.internal_dir.join('bin', 'findbugs_filter'), 210 if self.c.INTERNAL:
211 '-o', 'com.google.android.apps.chrome.-,org.chromium.-', 211 cmd.extend([
212 ] 212 '-b', self.internal_dir.join('bin', 'findbugs_filter'),
213 yield self.m.step('findbugs internal', cmd, env=self.get_env()) 213 '-o', 'com.google.android.apps.chrome.-,org.chromium.-',
214 ])
215 yield self.m.step('findbugs internal', cmd, env=self.get_env())
216 else:
217 yield self.m.step('findbugs', cmd, env=self.get_env())
214 218
215 # If findbugs fails, there could be stale class files. Delete them, and 219 # If findbugs fails, there could be stale class files. Delete them, and
216 # next run maybe we'll do better. 220 # next run maybe we'll do better.
217 if self.m.step_history.last_step().retcode != 0: 221 if self.m.step_history.last_step().retcode != 0:
218 yield self.m.path.rmwildcard( 222 yield self.m.path.rmwildcard(
219 '*.class', 223 '*.class',
220 self.m.path['checkout'].join('out'), 224 self.m.path['checkout'].join('out'),
221 always_run=True) 225 always_run=True)
222 226
227 if not self.c.INTERNAL:
228 cmd = [self.m.path['checkout'].join('tools', 'android', 'findbugs_plugin',
229 'test', 'run_findbugs_plugin_tests.py')]
230 if self.m.chromium.c.BUILD_CONFIG == 'Release':
231 cmd.append('--release-build')
232 yield self.m.step('findbugs_tests', cmd, env=self.get_env())
233
223 def checkdeps(self): 234 def checkdeps(self):
224 assert self.c.INTERNAL, 'checkdeps is only available on internal builds' 235 assert self.c.INTERNAL, 'checkdeps is only available on internal builds'
225 yield self.m.step( 236 yield self.m.step(
226 'checkdeps', 237 'checkdeps',
227 [self.m.path['checkout'].join('tools', 'checkdeps', 'checkdeps.py'), 238 [self.m.path['checkout'].join('tools', 'checkdeps', 'checkdeps.py'),
228 '--root=%s' % self.internal_dir], 239 '--root=%s' % self.internal_dir],
229 env=self.get_env()) 240 env=self.get_env())
230 241
242 def checklicenses(self):
243 yield self.m.step(
244 'check_licenses',
245 [self.m.path['checkout'].join('android_webview', 'tools',
246 'webview_licenses.py'),
247 'scan'],
248 env=self.get_env())
249
231 def lint(self): 250 def lint(self):
232 assert self.c.INTERNAL, 'lint is only available on internal builds' 251 assert self.c.INTERNAL, 'lint is only available on internal builds'
233 yield self.m.step( 252 yield self.m.step(
234 'lint', 253 'lint',
235 [self.internal_dir.join('bin', 'lint.py')], 254 [self.internal_dir.join('bin', 'lint.py')],
236 env=self.get_env()) 255 env=self.get_env())
237 256
238 def git_number(self): 257 def git_number(self):
239 yield self.m.step( 258 yield self.m.step(
240 'git_number', 259 'git_number',
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 359
341 360
342 def spawn_logcat_monitor(self): 361 def spawn_logcat_monitor(self):
343 return self.m.step( 362 return self.m.step(
344 'spawn_logcat_monitor', 363 'spawn_logcat_monitor',
345 [self.m.path['build'].join('scripts', 'slave', 'daemonizer.py'), 364 [self.m.path['build'].join('scripts', 'slave', 'daemonizer.py'),
346 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'), 365 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'),
347 self.m.chromium.c.build_dir.join('logcat')], 366 self.m.chromium.c.build_dir.join('logcat')],
348 env=self.get_env(), can_fail_build=False) 367 env=self.get_env(), can_fail_build=False)
349 368
350 def device_status_check(self, restart_usb=False): 369 def device_status_check(self, restart_usb=False, **kwargs):
351 args = [] 370 args = []
352 if restart_usb: 371 if restart_usb:
353 args = ['--restart-usb'] 372 args = ['--restart-usb']
354 yield self.m.step( 373 yield self.m.step(
355 'device_status_check', 374 'device_status_check',
356 [self.m.path['checkout'].join('build', 'android', 'buildbot', 375 [self.m.path['checkout'].join('build', 'android', 'buildbot',
357 'bb_device_status_check.py')] + args, 376 'bb_device_status_check.py')] + args,
358 env=self.get_env()) 377 env=self.get_env(),
378 **kwargs)
359 379
360 def provision_devices(self): 380 def provision_devices(self, **kwargs):
361 yield self.m.python( 381 yield self.m.python(
362 'provision_devices', 382 'provision_devices',
363 self.m.path['checkout'].join( 383 self.m.path['checkout'].join(
364 'build', 'android', 'provision_devices.py'), 384 'build', 'android', 'provision_devices.py'),
365 args=['-t', self.m.chromium.c.BUILD_CONFIG], 385 args=['-t', self.m.chromium.c.BUILD_CONFIG],
366 can_fail_build=False) 386 can_fail_build=False,
387 **kwargs)
367 388
368 def detect_and_setup_devices(self): 389 def detect_and_setup_devices(self):
369 yield self.device_status_check() 390 yield self.device_status_check()
370 yield self.provision_devices() 391 yield self.provision_devices()
371 392
372 if self.c.INTERNAL: 393 if self.c.INTERNAL:
373 yield self.m.step( 394 yield self.m.step(
374 'setup_devices_for_testing', 395 'setup_devices_for_testing',
375 [self.internal_dir.join('build', 'setup_device_testing.py')], 396 [self.internal_dir.join('build', 'setup_device_testing.py')],
376 env=self.get_env(), can_fail_build=False) 397 env=self.get_env(), can_fail_build=False)
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 635
615 yield self.m.gsutil.upload( 636 yield self.m.gsutil.upload(
616 source=self.coverage_dir.join('coverage_html'), 637 source=self.coverage_dir.join('coverage_html'),
617 bucket='chrome-code-coverage', 638 bucket='chrome-code-coverage',
618 dest=gs_dest, 639 dest=gs_dest,
619 args=['-R'], 640 args=['-R'],
620 name='upload coverage report', 641 name='upload coverage report',
621 link_name='Coverage report', 642 link_name='Coverage report',
622 always_run=True, 643 always_run=True,
623 **kwargs) 644 **kwargs)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/chromium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698