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

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

Issue 727543003: [Android] Fix new pylint errors in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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/buildbot/bb_device_steps.py ('k') | build/android/install_emulator_deps.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 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import collections 7 import collections
8 import copy 8 import copy
9 import json 9 import json
10 import os 10 import os
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 telemetry_tests = ['telemetry_perf_unittests'] 125 telemetry_tests = ['telemetry_perf_unittests']
126 telemetry_tests_user_build = ['telemetry_unittests', 126 telemetry_tests_user_build = ['telemetry_unittests',
127 'telemetry_perf_unittests'] 127 'telemetry_perf_unittests']
128 flakiness_server = ( 128 flakiness_server = (
129 '--flakiness-server=%s' % constants.UPSTREAM_FLAKINESS_SERVER) 129 '--flakiness-server=%s' % constants.UPSTREAM_FLAKINESS_SERVER)
130 experimental = ['--experimental'] 130 experimental = ['--experimental']
131 bisect_chrome_output_dir = os.path.abspath( 131 bisect_chrome_output_dir = os.path.abspath(
132 os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir, 132 os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, os.pardir,
133 os.pardir, 'bisect', 'src', 'out')) 133 os.pardir, 'bisect', 'src', 'out'))
134 B = BotConfig 134 B = BotConfig
135 H = (lambda steps, extra_args=None, extra_gyp=None, target_arch=None : 135 H = (lambda steps, extra_args=None, extra_gyp=None, target_arch=None:
136 HostConfig('build/android/buildbot/bb_host_steps.py', steps, extra_args, 136 HostConfig('build/android/buildbot/bb_host_steps.py', steps, extra_args,
137 extra_gyp, target_arch)) 137 extra_gyp, target_arch))
138 T = (lambda tests, extra_args=None : 138 T = (lambda tests, extra_args=None:
139 TestConfig('build/android/buildbot/bb_device_steps.py', tests, 139 TestConfig('build/android/buildbot/bb_device_steps.py', tests,
140 extra_args)) 140 extra_args))
141 141
142 bot_configs = [ 142 bot_configs = [
143 # Main builders 143 # Main builders
144 B('main-builder-dbg', H(std_build_steps + std_host_tests)), 144 B('main-builder-dbg', H(std_build_steps + std_host_tests)),
145 B('main-builder-rel', H(std_build_steps)), 145 B('main-builder-rel', H(std_build_steps)),
146 B('main-clang-builder', 146 B('main-clang-builder',
147 H(compile_step, extra_gyp='clang=1 component=shared_library')), 147 H(compile_step, extra_gyp='clang=1 component=shared_library')),
148 B('main-clobber', H(compile_step)), 148 B('main-clobber', H(compile_step)),
149 B('main-tests-rel', H(std_test_steps), 149 B('main-tests-rel', H(std_test_steps),
150 T(std_tests + telemetry_tests + chrome_proxy_tests, 150 T(std_tests + telemetry_tests + chrome_proxy_tests,
151 ['--cleanup', flakiness_server])), 151 ['--cleanup', flakiness_server])),
152 B('main-tests', H(std_test_steps), 152 B('main-tests', H(std_test_steps),
153 T(std_tests,['--cleanup', flakiness_server])), 153 T(std_tests, ['--cleanup', flakiness_server])),
154 154
155 # Other waterfalls 155 # Other waterfalls
156 B('asan-builder-tests', H(compile_step, 156 B('asan-builder-tests', H(compile_step,
157 extra_gyp='asan=1 component=shared_library'), 157 extra_gyp='asan=1 component=shared_library'),
158 T(std_tests, ['--asan', '--asan-symbolize'])), 158 T(std_tests, ['--asan', '--asan-symbolize'])),
159 B('blink-try-builder', H(compile_step)), 159 B('blink-try-builder', H(compile_step)),
160 B('chromedriver-fyi-tests-dbg', H(std_test_steps), 160 B('chromedriver-fyi-tests-dbg', H(std_test_steps),
161 T(['chromedriver'], ['--install=ChromeShell', '--skip-wipe', 161 T(['chromedriver'], ['--install=ChromeShell', '--skip-wipe',
162 '--cleanup'])), 162 '--cleanup'])),
163 B('fyi-x86-builder-dbg', 163 B('fyi-x86-builder-dbg',
164 H(compile_step + std_host_tests, experimental, target_arch='ia32')), 164 H(compile_step + std_host_tests, experimental, target_arch='ia32')),
165 B('fyi-builder-dbg', 165 B('fyi-builder-dbg',
166 H(std_build_steps + emma_coverage_tests, experimental, 166 H(std_build_steps + emma_coverage_tests, experimental,
167 extra_gyp='emma_coverage=1')), 167 extra_gyp='emma_coverage=1')),
168 B('x86-builder-dbg', 168 B('x86-builder-dbg',
169 H(compile_step + std_host_tests, target_arch='ia32')), 169 H(compile_step + std_host_tests, target_arch='ia32')),
170 B('fyi-builder-rel', H(std_build_steps, experimental)), 170 B('fyi-builder-rel', H(std_build_steps, experimental)),
171 B('fyi-tests', H(std_test_steps), 171 B('fyi-tests', H(std_test_steps),
172 T(std_tests + python_unittests, 172 T(std_tests + python_unittests,
173 ['--experimental', flakiness_server, 173 ['--experimental', flakiness_server,
174 '--coverage-bucket', CHROMIUM_COVERAGE_BUCKET, 174 '--coverage-bucket', CHROMIUM_COVERAGE_BUCKET,
175 '--cleanup'])), 175 '--cleanup'])),
176 B('user-build-fyi-tests-dbg', H(std_test_steps), 176 B('user-build-fyi-tests-dbg', H(std_test_steps),
177 T(telemetry_tests_user_build)), 177 T(telemetry_tests_user_build)),
178 B('fyi-component-builder-tests-dbg', 178 B('fyi-component-builder-tests-dbg',
179 H(compile_step, extra_gyp='component=shared_library'), 179 H(compile_step, extra_gyp='component=shared_library'),
180 T(std_tests, ['--experimental', flakiness_server])), 180 T(std_tests, ['--experimental', flakiness_server])),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return bot_map 227 return bot_map
228 228
229 229
230 # Return an object from the map, looking first for an exact id match. 230 # Return an object from the map, looking first for an exact id match.
231 # If this fails, look for an id which is a substring of the specified id. 231 # If this fails, look for an id which is a substring of the specified id.
232 # Choose the longest of all substring matches. 232 # Choose the longest of all substring matches.
233 # pylint: disable=W0622 233 # pylint: disable=W0622
234 def GetBestMatch(id_map, id): 234 def GetBestMatch(id_map, id):
235 config = id_map.get(id) 235 config = id_map.get(id)
236 if not config: 236 if not config:
237 substring_matches = filter(lambda x: x in id, id_map.iterkeys()) 237 substring_matches = [x for x in id_map.iterkeys() if x in id]
238 if substring_matches: 238 if substring_matches:
239 max_id = max(substring_matches, key=len) 239 max_id = max(substring_matches, key=len)
240 print 'Using config from id="%s" (substring match).' % max_id 240 print 'Using config from id="%s" (substring match).' % max_id
241 config = id_map[max_id] 241 config = id_map[max_id]
242 return config 242 return config
243 243
244 244
245 def GetRunBotOptParser(): 245 def GetRunBotOptParser():
246 parser = bb_utils.GetParser() 246 parser = bb_utils.GetParser()
247 parser.add_option('--bot-id', help='Specify bot id directly.') 247 parser.add_option('--bot-id', help='Specify bot id directly.')
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 for command in commands: 305 for command in commands:
306 print 'Will run: ', bb_utils.CommandToString(command) 306 print 'Will run: ', bb_utils.CommandToString(command)
307 print 307 print
308 308
309 env = GetEnvironment(bot_config.host_obj, options.testing) 309 env = GetEnvironment(bot_config.host_obj, options.testing)
310 return RunBotCommands(options, commands, env) 310 return RunBotCommands(options, commands, env)
311 311
312 312
313 if __name__ == '__main__': 313 if __name__ == '__main__':
314 sys.exit(main(sys.argv)) 314 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/buildbot/bb_device_steps.py ('k') | build/android/install_emulator_deps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698