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

Side by Side Diff: build/android/buildbot/bb_host_steps.py

Issue 1000793002: [Android] Incorporate findbugs into android builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address cjhopman's comment + rebase Created 5 years, 9 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 | « build/android/PRESUBMIT.py ('k') | build/android/buildbot/bb_run_bot.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 8
9 import bb_utils 9 import bb_utils
10 import bb_annotations 10 import bb_annotations
11 11
12 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) 12 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
13 from pylib import constants 13 from pylib import constants
14 14
15 15
16 SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave') 16 SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave')
17 VALID_HOST_TESTS = set(['check_webview_licenses', 'findbugs']) 17 VALID_HOST_TESTS = set(['check_webview_licenses'])
18 18
19 DIR_BUILD_ROOT = os.path.dirname(constants.DIR_SOURCE_ROOT) 19 DIR_BUILD_ROOT = os.path.dirname(constants.DIR_SOURCE_ROOT)
20 20
21 # Short hand for RunCmd which is used extensively in this file. 21 # Short hand for RunCmd which is used extensively in this file.
22 RunCmd = bb_utils.RunCmd 22 RunCmd = bb_utils.RunCmd
23 23
24 24
25 def SrcPath(*path): 25 def SrcPath(*path):
26 return os.path.join(constants.DIR_SOURCE_ROOT, *path) 26 return os.path.join(constants.DIR_SOURCE_ROOT, *path)
27 27
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests'] 71 '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests']
72 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT) 72 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT)
73 73
74 74
75 def ExtractBuild(options): 75 def ExtractBuild(options):
76 bb_annotations.PrintNamedStep('extract_build') 76 bb_annotations.PrintNamedStep('extract_build')
77 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')] 77 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')]
78 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT) 78 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT)
79 79
80 80
81 def FindBugs(options):
82 bb_annotations.PrintNamedStep('findbugs')
83 build_type = []
84 if options.target == 'Release':
85 build_type = ['--release-build']
86 RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type)
87 RunCmd([SrcPath(
88 'tools', 'android', 'findbugs_plugin', 'test',
89 'run_findbugs_plugin_tests.py')] + build_type)
90
91
92 def BisectPerfRegression(options): 81 def BisectPerfRegression(options):
93 args = [] 82 args = []
94 if options.extra_src: 83 if options.extra_src:
95 args = ['--extra_src', options.extra_src] 84 args = ['--extra_src', options.extra_src]
96 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), 85 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'),
97 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) 86 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)])
98 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), 87 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'),
99 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)] + args) 88 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)] + args)
100 89
101 90
102 def GetHostStepCmds(): 91 def GetHostStepCmds():
103 return [ 92 return [
104 ('compile', Compile), 93 ('compile', Compile),
105 ('extract_build', ExtractBuild), 94 ('extract_build', ExtractBuild),
106 ('check_webview_licenses', CheckWebViewLicenses), 95 ('check_webview_licenses', CheckWebViewLicenses),
107 ('bisect_perf_regression', BisectPerfRegression), 96 ('bisect_perf_regression', BisectPerfRegression),
108 ('findbugs', FindBugs),
109 ('zip_build', ZipBuild) 97 ('zip_build', ZipBuild)
110 ] 98 ]
111 99
112 100
113 def GetHostStepsOptParser(): 101 def GetHostStepsOptParser():
114 parser = bb_utils.GetParser() 102 parser = bb_utils.GetParser()
115 parser.add_option('--steps', help='Comma separated list of host tests.') 103 parser.add_option('--steps', help='Comma separated list of host tests.')
116 parser.add_option('--build-targets', default='', 104 parser.add_option('--build-targets', default='',
117 help='Comma separated list of build targets.') 105 help='Comma separated list of build targets.')
118 parser.add_option('--experimental', action='store_true', 106 parser.add_option('--experimental', action='store_true',
(...skipping 14 matching lines...) Expand all
133 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 121 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
134 setattr(options, 'extra_src', 122 setattr(options, 'extra_src',
135 options.factory_properties.get('extra_src', '')) 123 options.factory_properties.get('extra_src', ''))
136 124
137 if options.steps: 125 if options.steps:
138 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) 126 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options)
139 127
140 128
141 if __name__ == '__main__': 129 if __name__ == '__main__':
142 sys.exit(main(sys.argv)) 130 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/buildbot/bb_run_bot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698