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

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

Issue 14192007: Add bot config for Android component builder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | no next file » | 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 optparse 10 import optparse
11 import os 11 import os
12 import pipes 12 import pipes
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 15
16 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) 16 sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
17 from pylib import buildbot_report 17 from pylib import buildbot_report
18 18
19 CHROME_SRC = os.path.abspath( 19 CHROME_SRC = os.path.abspath(
20 os.path.join(os.path.dirname(__file__), '..', '..', '..')) 20 os.path.join(os.path.dirname(__file__), '..', '..', '..'))
21 21
22 GLOBAL_SLAVE_PROPS = {} 22 GLOBAL_SLAVE_PROPS = {}
23 23
24 BotConfig = collections.namedtuple( 24 BotConfig = collections.namedtuple(
25 'BotConfig', ['bot_id', 'bash_funs', 'test_obj', 'slave_props']) 25 'BotConfig',
26 ['bot_id', 'bash_funs', 'test_obj', 'slave_props', 'factory_properties'])
26 TestConfig = collections.namedtuple('Tests', ['tests', 'extra_args']) 27 TestConfig = collections.namedtuple('Tests', ['tests', 'extra_args'])
27 Command = collections.namedtuple( 28 Command = collections.namedtuple(
28 'Command', ['step_name', 'command', 'testing_cmd']) 29 'Command', ['step_name', 'command', 'testing_cmd'])
29 30
30 31
31 def GetCommands(options, bot_config): 32 def GetCommands(options, bot_config):
32 """Get a formatted list of commands. 33 """Get a formatted list of commands.
33 34
34 Args: 35 Args:
35 options: Options object. 36 options: Options object.
36 bot_config: A BotConfig named tuple. 37 bot_config: A BotConfig named tuple.
37 Returns: 38 Returns:
38 list of Command objects. 39 list of Command objects.
39 """ 40 """
40 slave_props = dict(GLOBAL_SLAVE_PROPS) 41 slave_props = dict(GLOBAL_SLAVE_PROPS)
41 if bot_config.slave_props: 42 if bot_config.slave_props:
42 slave_props.update(bot_config.slave_props) 43 slave_props.update(bot_config.slave_props)
44 if bot_config.factory_properties:
45 options.factory_properties.update(bot_config.factory_properties)
Isaac (away) 2013/04/18 22:35:59 This is not the right code path... factory_proper
Siva Chandra 2013/04/18 22:48:58 'extra_gyp_defines' need to be set in factory prop
43 46
44 property_args = [ 47 property_args = [
45 '--factory-properties=%s' % json.dumps(options.factory_properties), 48 '--factory-properties=%s' % json.dumps(options.factory_properties),
46 '--build-properties=%s' % json.dumps(options.build_properties), 49 '--build-properties=%s' % json.dumps(options.build_properties),
47 '--slave-properties=%s' % json.dumps(slave_props)] 50 '--slave-properties=%s' % json.dumps(slave_props)]
48 51
49 commands = [] 52 commands = []
50 def WrapWithBash(command): 53 def WrapWithBash(command):
51 """Wrap a bash command string with envsetup scripts.""" 54 """Wrap a bash command string with envsetup scripts."""
52 return ['bash', '-exc', '; '.join([ 55 return ['bash', '-exc', '; '.join([
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 flakiness_server = '--upload-to-flakiness-server' 88 flakiness_server = '--upload-to-flakiness-server'
86 89
87 B = BotConfig 90 B = BotConfig
88 def T(tests, extra_args=None): 91 def T(tests, extra_args=None):
89 return TestConfig(tests, extra_args) 92 return TestConfig(tests, extra_args)
90 93
91 bot_configs = [ 94 bot_configs = [
92 # Main builders 95 # Main builders
93 B('main-builder-dbg', 96 B('main-builder-dbg',
94 ['bb_check_webview_licenses', 'bb_compile', 'bb_run_findbugs', 97 ['bb_check_webview_licenses', 'bb_compile', 'bb_run_findbugs',
95 'bb_zip_build'], None, None), 98 'bb_zip_build'], None, None, None),
96 B('main-builder-rel', 99 B('main-builder-rel',
97 ['bb_compile', 'bb_zip_build'], None, None), 100 ['bb_compile', 'bb_zip_build'], None, None, None),
98 B('main-clang-builder', compile_step, None, None), 101 B('main-clang-builder', compile_step, None, None, None),
99 B('main-clobber', compile_step, None, None), 102 B('main-clobber', compile_step, None, None, None),
100 B('main-tests', std_test_steps, T(std_tests, [flakiness_server]), 103 B('main-tests', std_test_steps, T(std_tests, [flakiness_server]),
104 None, None),
105
106 # Other waterfalls
107 B('asan-builder', std_build_steps, None, None, None),
108 B('asan-tests', std_test_steps + ['bb_asan_tests_setup'],
109 T(std_tests, ['--asan']), None, None),
110 B('chromedriver-fyi-tests-dbg', std_test_steps, T(['chromedriver']),
111 None, None),
112 B('fyi-builder-dbg',
113 ['bb_check_webview_licenses', 'bb_compile', 'bb_compile_experimental',
114 'bb_run_findbugs', 'bb_zip_build'], None, None, None),
115 B('fyi-builder-rel',
116 ['bb_compile', 'bb_compile_experimental', 'bb_zip_build'], None, None,
117 None),
118 B('fyi-tests', std_test_steps,
119 T(std_tests, ['--experimental', flakiness_server]), None, None),
120 B('fyi-component-builder-dbg', compile_step,
121 T(std_tests, ['--experimental', flakiness_server]), None,
122 {'extra_gyp_defines' : 'component=shared_library'}),
123 B('perf-tests-rel', std_test_steps, T([], ['--install=ContentShell']),
124 None, None),
125 B('webkit-latest-webkit-tests', std_test_steps,
126 T(['webkit_layout', 'webkit']), None, None),
127 B('webkit-latest-contentshell', compile_step, T(['webkit_layout']), None,
101 None), 128 None),
102 129
103 # Other waterfalls
104 B('asan-builder', std_build_steps, None, None),
105 B('asan-tests', std_test_steps + ['bb_asan_tests_setup'],
106 T(std_tests, ['--asan']), None),
107 B('chromedriver-fyi-tests-dbg', std_test_steps, T(['chromedriver']),
108 None),
109 B('fyi-builder-dbg',
110 ['bb_check_webview_licenses', 'bb_compile', 'bb_compile_experimental',
111 'bb_run_findbugs', 'bb_zip_build'], None, None),
112 B('fyi-builder-rel',
113 ['bb_compile', 'bb_compile_experimental', 'bb_zip_build'], None, None),
114 B('fyi-tests', std_test_steps,
115 T(std_tests, ['--experimental', flakiness_server]), None),
116 B('perf-tests-rel', std_test_steps,
117 T([], ['--install=ContentShell']),
118 None),
119 B('webkit-latest-webkit-tests', std_test_steps,
120 T(['webkit_layout', 'webkit']), None),
121 B('webkit-latest-contentshell', compile_step, T(['webkit_layout']), None),
122
123 # Generic builder config (for substring match). 130 # Generic builder config (for substring match).
124 B('builder', std_build_steps, None, None), 131 B('builder', std_build_steps, None, None, None),
125 ] 132 ]
126 133
127 bot_map = dict((config.bot_id, config) for config in bot_configs) 134 bot_map = dict((config.bot_id, config) for config in bot_configs)
128 135
129 # These bots have identical configuration to ones defined earlier. 136 # These bots have identical configuration to ones defined earlier.
130 copy_map = [ 137 copy_map = [
131 ('lkgr-clobber', 'main-clobber'), 138 ('lkgr-clobber', 'main-clobber'),
132 ('try-builder-dbg', 'main-builder-dbg'), 139 ('try-builder-dbg', 'main-builder-dbg'),
133 ('try-builder-rel', 'main-builder-rel'), 140 ('try-builder-rel', 'main-builder-rel'),
134 ('try-clang-builder', 'main-clang-builder'), 141 ('try-clang-builder', 'main-clang-builder'),
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 cwd=CHROME_SRC, 223 cwd=CHROME_SRC,
217 env=dict(os.environ, BUILDBOT_TESTING='1')) 224 env=dict(os.environ, BUILDBOT_TESTING='1'))
218 else: 225 else:
219 return_code = subprocess.call(command, cwd=CHROME_SRC, env=env) 226 return_code = subprocess.call(command, cwd=CHROME_SRC, env=env)
220 if return_code != 0: 227 if return_code != 0:
221 return return_code 228 return return_code
222 229
223 230
224 if __name__ == '__main__': 231 if __name__ == '__main__':
225 sys.exit(main(sys.argv)) 232 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698