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

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

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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 #!/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 json
7 import sys 8 import sys
8 9
9 import bb_utils 10 import bb_utils
10 import bb_annotations 11 import bb_annotations
11 12
12 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) 13 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
13 from pylib import constants 14 from pylib import constants
14 15
15 16
16 SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave') 17 SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave')
17 VALID_HOST_TESTS = set(['check_webview_licenses', 'findbugs']) 18 VALID_HOST_TESTS = set(['check_webview_licenses'])
18 19
19 DIR_BUILD_ROOT = os.path.dirname(constants.DIR_SOURCE_ROOT) 20 DIR_BUILD_ROOT = os.path.dirname(constants.DIR_SOURCE_ROOT)
20 21
21 # Short hand for RunCmd which is used extensively in this file. 22 # Short hand for RunCmd which is used extensively in this file.
22 RunCmd = bb_utils.RunCmd 23 RunCmd = bb_utils.RunCmd
23 24
24 25
25 def SrcPath(*path): 26 def SrcPath(*path):
26 return os.path.join(constants.DIR_SOURCE_ROOT, *path) 27 return os.path.join(constants.DIR_SOURCE_ROOT, *path)
27 28
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests'] 72 '--exclude-files', 'lib.target,gen,android_webview,jingle_unittests']
72 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT) 73 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT)
73 74
74 75
75 def ExtractBuild(options): 76 def ExtractBuild(options):
76 bb_annotations.PrintNamedStep('extract_build') 77 bb_annotations.PrintNamedStep('extract_build')
77 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')] 78 RunCmd([os.path.join(SLAVE_SCRIPTS_DIR, 'extract_build.py')]
78 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT) 79 + bb_utils.EncodeProperties(options), cwd=DIR_BUILD_ROOT)
79 80
80 81
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): 82 def BisectPerfRegression(options):
93 args = [] 83 args = []
94 if options.extra_src: 84 if options.extra_src:
95 args = ['--extra_src', options.extra_src] 85 args = ['--extra_src', options.extra_src]
96 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'), 86 RunCmd([SrcPath('tools', 'prepare-bisect-perf-regression.py'),
97 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)]) 87 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)])
98 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'), 88 RunCmd([SrcPath('tools', 'run-bisect-perf-regression.py'),
99 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir)] + args) 89 '-w', os.path.join(constants.DIR_SOURCE_ROOT, os.pardir),
90 '--build-properties=%s' % json.dumps(options.build_properties)] +
91 args)
100 92
101 93
102 def GetHostStepCmds(): 94 def GetHostStepCmds():
103 return [ 95 return [
104 ('compile', Compile), 96 ('compile', Compile),
105 ('extract_build', ExtractBuild), 97 ('extract_build', ExtractBuild),
106 ('check_webview_licenses', CheckWebViewLicenses), 98 ('check_webview_licenses', CheckWebViewLicenses),
107 ('bisect_perf_regression', BisectPerfRegression), 99 ('bisect_perf_regression', BisectPerfRegression),
108 ('findbugs', FindBugs),
109 ('zip_build', ZipBuild) 100 ('zip_build', ZipBuild)
110 ] 101 ]
111 102
112 103
113 def GetHostStepsOptParser(): 104 def GetHostStepsOptParser():
114 parser = bb_utils.GetParser() 105 parser = bb_utils.GetParser()
115 parser.add_option('--steps', help='Comma separated list of host tests.') 106 parser.add_option('--steps', help='Comma separated list of host tests.')
116 parser.add_option('--build-targets', default='', 107 parser.add_option('--build-targets', default='',
117 help='Comma separated list of build targets.') 108 help='Comma separated list of build targets.')
118 parser.add_option('--experimental', action='store_true', 109 parser.add_option('--experimental', action='store_true',
(...skipping 14 matching lines...) Expand all
133 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 124 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
134 setattr(options, 'extra_src', 125 setattr(options, 'extra_src',
135 options.factory_properties.get('extra_src', '')) 126 options.factory_properties.get('extra_src', ''))
136 127
137 if options.steps: 128 if options.steps:
138 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) 129 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options)
139 130
140 131
141 if __name__ == '__main__': 132 if __name__ == '__main__':
142 sys.exit(main(sys.argv)) 133 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698