OLD | NEW |
---|---|
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 27 matching lines...) Expand all Loading... | |
38 diff.append('+ %s=%s' % (key, pipes.quote(d2[key]))) | 38 diff.append('+ %s=%s' % (key, pipes.quote(d2[key]))) |
39 return '\n'.join(diff) | 39 return '\n'.join(diff) |
40 | 40 |
41 | 41 |
42 def GetEnvironment(host_obj, testing): | 42 def GetEnvironment(host_obj, testing): |
43 init_env = dict(os.environ) | 43 init_env = dict(os.environ) |
44 init_env['GYP_GENERATORS'] = 'ninja' | 44 init_env['GYP_GENERATORS'] = 'ninja' |
45 init_env['GOMA_DIR'] = bb_utils.GOMA_DIR | 45 init_env['GOMA_DIR'] = bb_utils.GOMA_DIR |
46 envsetup_cmd = '. build/android/envsetup.sh' | 46 envsetup_cmd = '. build/android/envsetup.sh' |
47 if host_obj.target_arch: | 47 if host_obj.target_arch: |
48 envsetup_cmd += ' --target_arch=%s' % host_obj.target_arch | 48 envsetup_cmd += ' --target-arch=%s' % host_obj.target_arch |
49 if testing: | 49 if testing: |
50 # Skip envsetup to avoid presubmit dependence on android deps. | 50 # Skip envsetup to avoid presubmit dependence on android deps. |
51 print 'Testing mode - skipping "%s"' % envsetup_cmd | 51 print 'Testing mode - skipping "%s"' % envsetup_cmd |
52 envsetup_cmd = ':' | 52 envsetup_cmd = ':' |
53 else: | 53 else: |
54 print 'Running %s' % envsetup_cmd | 54 print 'Running %s' % envsetup_cmd |
55 proc = subprocess.Popen(['bash', '-exc', | 55 proc = subprocess.Popen(['bash', '-exc', |
56 envsetup_cmd + ' >&2; python build/android/buildbot/env_to_json.py'], | 56 envsetup_cmd + ' >&2; python build/android/buildbot/env_to_json.py'], |
57 stdout=subprocess.PIPE, stderr=subprocess.PIPE, | 57 stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
58 cwd=bb_utils.CHROME_SRC, env=init_env) | 58 cwd=bb_utils.CHROME_SRC, env=init_env) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 return commands | 105 return commands |
106 | 106 |
107 | 107 |
108 def GetBotStepMap(): | 108 def GetBotStepMap(): |
109 compile_step = ['compile'] | 109 compile_step = ['compile'] |
110 std_host_tests = ['check_webview_licenses', 'findbugs'] | 110 std_host_tests = ['check_webview_licenses', 'findbugs'] |
111 std_build_steps = ['compile', 'zip_build'] | 111 std_build_steps = ['compile', 'zip_build'] |
112 std_test_steps = ['extract_build'] | 112 std_test_steps = ['extract_build'] |
113 std_tests = ['ui', 'unit'] | 113 std_tests = ['ui', 'unit'] |
114 flakiness_server = '--upload-to-flakiness-server' | 114 flakiness_server = '--upload-to-flakiness-server' |
115 fyi_host_args = ['--experimental'] | |
116 fyi_test_args = ['--experimental', flakiness_server] | |
Isaac (away)
2013/07/03 09:02:28
too many vars, remove 116
Siva Chandra
2013/07/09 20:47:55
Done.
| |
115 | 117 |
116 B = BotConfig | 118 B = BotConfig |
117 H = (lambda steps, extra_args=None, extra_gyp=None, target_arch=None : | 119 H = (lambda steps, extra_args=None, extra_gyp=None, target_arch=None : |
118 HostConfig('build/android/buildbot/bb_host_steps.py', steps, extra_args, | 120 HostConfig('build/android/buildbot/bb_host_steps.py', steps, extra_args, |
119 extra_gyp, target_arch)) | 121 extra_gyp, target_arch)) |
120 T = (lambda tests, extra_args=None : | 122 T = (lambda tests, extra_args=None : |
121 TestConfig('build/android/buildbot/bb_device_steps.py', tests, | 123 TestConfig('build/android/buildbot/bb_device_steps.py', tests, |
122 extra_args)) | 124 extra_args)) |
123 | 125 |
124 bot_configs = [ | 126 bot_configs = [ |
125 # Main builders | 127 # Main builders |
126 B('main-builder-dbg', H(std_build_steps + std_host_tests)), | 128 B('main-builder-dbg', H(std_build_steps + std_host_tests)), |
127 B('main-builder-rel', H(std_build_steps)), | 129 B('main-builder-rel', H(std_build_steps)), |
128 B('main-clang-builder', | 130 B('main-clang-builder', |
129 H(compile_step, extra_gyp='clang=1 component=shared_library')), | 131 H(compile_step, extra_gyp='clang=1 component=shared_library')), |
130 B('main-clobber', H(compile_step)), | 132 B('main-clobber', H(compile_step)), |
131 B('main-tests', H(std_test_steps), T(std_tests, [flakiness_server])), | 133 B('main-tests', H(std_test_steps), T(std_tests, [flakiness_server])), |
132 | 134 |
133 # Other waterfalls | 135 # Other waterfalls |
134 B('asan-builder-tests', H(compile_step, extra_gyp='asan=1'), | 136 B('asan-builder-tests', H(compile_step, extra_gyp='asan=1'), |
135 T(std_tests, ['--asan'])), | 137 T(std_tests, ['--asan'])), |
136 B('chromedriver-fyi-tests-dbg', H(std_test_steps), | 138 B('chromedriver-fyi-tests-dbg', H(std_test_steps), |
137 T(['chromedriver'], ['--install=ChromiumTestShell'])), | 139 T(['chromedriver'], ['--install=ChromiumTestShell'])), |
140 B('fyi-x86-builder-dbg', | |
141 H(compile_step + std_host_tests, fyi_host_args, target_arch='x86')), | |
138 B('fyi-builder-dbg', | 142 B('fyi-builder-dbg', |
139 H(std_build_steps + std_host_tests, ['--experimental'])), | 143 H(std_build_steps + std_host_tests, fyi_host_args)), |
140 B('fyi-builder-rel', H(std_build_steps, ['--experimental'])), | 144 B('fyi-builder-rel', H(std_build_steps, fyi_host_args)), |
141 B('fyi-tests-dbg-ics-gn', H(compile_step, [ '--experimental']), | 145 B('fyi-tests-dbg-ics-gn', H(compile_step, fyi_host_args), |
Isaac (away)
2013/07/03 09:02:28
please remove fyi-tests-dbg-ics-gn config.
Siva Chandra
2013/07/09 20:47:55
Done.
| |
142 T(std_tests, ['--experimental', flakiness_server])), | 146 T(std_tests, fyi_test_args)), |
143 B('fyi-tests', H(std_test_steps), | 147 B('fyi-tests', H(std_test_steps), T(std_tests, fyi_test_args)), |
144 T(std_tests, ['--experimental', flakiness_server])), | |
145 B('fyi-component-builder-tests-dbg', | 148 B('fyi-component-builder-tests-dbg', |
146 H(compile_step, extra_gyp='component=shared_library'), | 149 H(compile_step, extra_gyp='component=shared_library'), |
147 T(std_tests, ['--experimental', flakiness_server])), | 150 T(std_tests, fyi_test_args)), |
148 B('perf-bisect-builder-tests-dbg', H(['bisect_perf_regression'])), | 151 B('perf-bisect-builder-tests-dbg', H(['bisect_perf_regression'])), |
149 B('perf-tests-rel', H(std_test_steps), | 152 B('perf-tests-rel', H(std_test_steps), |
150 T([], ['--install=ChromiumTestShell'])), | 153 T([], ['--install=ChromiumTestShell'])), |
154 B('try-x86-builder-dbg', | |
Isaac (away)
2013/07/03 09:02:28
Please follow the same pattern as other trybot con
Siva Chandra
2013/07/09 20:47:55
Done.
| |
155 H(compile_step + std_host_tests, target_arch='x86')), | |
151 B('webkit-latest-webkit-tests', H(std_test_steps), | 156 B('webkit-latest-webkit-tests', H(std_test_steps), |
152 T(['webkit_layout', 'webkit'])), | 157 T(['webkit_layout', 'webkit'])), |
153 B('webkit-latest-contentshell', H(compile_step), T(['webkit_layout'])), | 158 B('webkit-latest-contentshell', H(compile_step), T(['webkit_layout'])), |
154 B('builder-unit-tests', H(compile_step), T(['unit'])), | 159 B('builder-unit-tests', H(compile_step), T(['unit'])), |
155 | 160 |
156 # Generic builder config (for substring match). | 161 # Generic builder config (for substring match). |
157 B('builder', H(std_build_steps)), | 162 B('builder', H(std_build_steps)), |
158 ] | 163 ] |
159 | 164 |
160 bot_map = dict((config.bot_id, config) for config in bot_configs) | 165 bot_map = dict((config.bot_id, config) for config in bot_configs) |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 sys.stdout.flush() | 248 sys.stdout.flush() |
244 if options.testing: | 249 if options.testing: |
245 env['BUILDBOT_TESTING'] = '1' | 250 env['BUILDBOT_TESTING'] = '1' |
246 return_code = subprocess.call(command, cwd=bb_utils.CHROME_SRC, env=env) | 251 return_code = subprocess.call(command, cwd=bb_utils.CHROME_SRC, env=env) |
247 if return_code != 0: | 252 if return_code != 0: |
248 return return_code | 253 return return_code |
249 | 254 |
250 | 255 |
251 if __name__ == '__main__': | 256 if __name__ == '__main__': |
252 sys.exit(main(sys.argv)) | 257 sys.exit(main(sys.argv)) |
OLD | NEW |