OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 # Sets up all the builders we want this buildbot master to run. | |
6 | |
7 | |
8 #pylint: disable=C0301 | |
9 | |
10 | |
11 from skia_master_scripts.canary_factory import CanaryFactory as f_canary | |
12 from skia_master_scripts.chromeos_factory import ChromeOSFactory as f_cros | |
13 from skia_master_scripts.drt_canary_factory import DRTCanaryFactory as f_drt | |
14 from skia_master_scripts.factory import SkiaFactory as f_factory | |
15 from skia_master_scripts import utils | |
16 from skia_master_scripts.xsan_factory import XsanFactory as f_xsan | |
17 from skia_master_scripts.factory import TARGET_PLATFORM_LINUX as LINUX | |
18 from skia_master_scripts.factory import TARGET_PLATFORM_WIN32 as WIN32 | |
19 from skia_master_scripts.factory import TARGET_PLATFORM_MAC as MAC | |
20 | |
21 import builder_name_schema | |
22 import collections | |
23 | |
24 | |
25 # Directory where we want to record performance data | |
26 # | |
27 # TODO(epoger): consider changing to reuse existing config.Master.perf_base_url, | |
28 # config.Master.perf_report_url_suffix, etc. | |
29 perf_output_basedir_linux = '../../../../perfdata' | |
30 perf_output_basedir_mac = perf_output_basedir_linux | |
31 perf_output_basedir_windows = '..\\..\\..\\..\\perfdata' | |
32 | |
33 | |
34 # Maps a target platform to a perf_output_basedir. | |
35 PERF_OUTPUT_BASEDIR = { | |
36 LINUX: perf_output_basedir_linux, | |
37 MAC: perf_output_basedir_mac, | |
38 WIN32: perf_output_basedir_windows, | |
39 } | |
40 | |
41 | |
42 # Schedulers used by the build master. | |
43 S_PERCOMMIT = 'skia_percommit_scheduler' | |
44 S_NIGHTLY = 'skia_nightly_scheduler' | |
45 S_15MINS = 'skia_15_minute_scheduler' | |
46 | |
47 | |
48 defaults = {} | |
49 | |
50 | |
51 ARCH_TO_GYP_DEFINE = { | |
52 'x86': {'skia_arch_width': '32'}, | |
53 'x86_64': {'skia_arch_width': '64'}, | |
54 'Arm7': {'skia_arch_width': '32'}, | |
55 'Arm64': {'skia_arch_width': '64'}, | |
56 'Mips': {'skia_arch_width': '32'}, | |
57 'Mips64': {'skia_arch_width': '64'}, | |
58 'MipsDSP2': {'skia_arch_width': '32'}, | |
59 'NaCl': None, | |
60 } | |
61 | |
62 | |
63 CHROMEOS_BOARD_NAME = { | |
64 'Alex': 'x86-alex', | |
65 'Link': 'link', | |
66 'Daisy': 'daisy', | |
67 } | |
68 | |
69 | |
70 # GYP_DEFINES for various types of builders. | |
71 GYP_WIN7 = repr({'skia_win_debuggers_path': 'c:/DbgHelp', | |
72 'qt_sdk': 'C:/Qt/4.8.5/'}) | |
73 GYP_WIN8 = repr({'skia_win_debuggers_path': 'c:/DbgHelp', | |
74 'qt_sdk': 'C:/Qt/Qt5.1.0/5.1.0/msvc2012_64/'}) | |
75 GYP_ANGLE = repr({'skia_win_debuggers_path': 'c:/DbgHelp', | |
76 'qt_sdk': 'C:/Qt/4.8.5/', | |
77 'skia_angle': '1'}) | |
78 GYP_GDI = repr({'skia_win_debuggers_path': 'c:/DbgHelp', | |
79 'qt_sdk': 'C:/Qt/4.8.5/', | |
80 'skia_gdi': '1'}) | |
81 GYP_EXC = repr({'skia_win_debuggers_path': 'c:/DbgHelp', | |
82 'qt_sdk': 'C:/Qt/4.8.5/', | |
83 'skia_win_exceptions': '1'}) | |
84 GYP_IOS = repr({'skia_os': 'ios'}) | |
85 NO_GPU = repr({'skia_gpu': '0'}) | |
86 CLANG = repr({'skia_clang_build': '1'}) | |
87 VALGRIND = repr({'skia_release_optimization_level': '1'}) | |
88 PDFVIEWER = repr({'skia_run_pdfviewer_in_gm': '1'}) | |
89 GYP_SHARED = repr({'component': 'shared_library'}) | |
90 NO_GPU_SHARED = repr({'skia_gpu': '0', 'skia_shared_lib': '1'}) | |
91 | |
92 | |
93 def get_gyp_defines(arch, gyp_defines_str=None): | |
94 """Build a dictionary of gyp defines. | |
95 | |
96 Args: | |
97 arch: string; target architecture. Needs to appear in ARCH_TO_GYP_DEFINE. | |
98 gyp_defines_str: optional string; a string representation of a dictionary | |
99 of gyp defines. | |
100 Returns: | |
101 a dictionary mapping gyp variable names to their intended values. | |
102 """ | |
103 try: | |
104 arch_width_define = ARCH_TO_GYP_DEFINE[arch] | |
105 except KeyError: | |
106 raise Exception('Unknown arch type: %s' % arch) | |
107 gyp_defines = eval(gyp_defines_str or 'None') | |
108 if arch_width_define: | |
109 if not gyp_defines: | |
110 gyp_defines = arch_width_define | |
111 else: | |
112 if 'skia_arch_width' in gyp_defines.keys(): | |
113 raise ValueError('Cannot define skia_arch_width; it is derived from ' | |
114 'the provided arch type.') | |
115 gyp_defines.update(arch_width_define) | |
116 return gyp_defines | |
117 | |
118 | |
119 # Types of builders to be used below. | |
120 class BaseBuilder: | |
121 | |
122 def _create(self, helper, do_upload_render_results, do_upload_bench_results, | |
123 is_trybot=False): | |
124 """Internal method used by create() to set up a builder. | |
125 | |
126 Args: | |
127 helper: instance of utils.SkiaHelper | |
128 do_upload_render_results: bool; whether the builder should upload its | |
129 render results. | |
130 do_upload_bench_results: bool; whether the builder should upload its | |
131 bench results. | |
132 is_trybot: bool; whether or not the builder is a trybot. | |
133 """ | |
134 builder_name = builder_name_schema.BuilderNameFromObject(self, is_trybot) | |
135 if is_trybot: | |
136 # Override the scheduler for trybots. | |
137 scheduler_name = utils.TRY_SCHEDULERS_STR | |
138 else: | |
139 scheduler_name = self.scheduler | |
140 | |
141 helper.Builder(builder_name, 'f_%s' % builder_name, | |
142 scheduler=scheduler_name) | |
143 helper.Factory('f_%s' % builder_name, self.factory_type( | |
144 builder_name=builder_name, | |
145 do_patch_step=is_trybot, | |
146 do_upload_render_results=do_upload_render_results, | |
147 do_upload_bench_results=do_upload_bench_results, | |
148 **self.factory_args | |
149 ).Build(**({'role': self.role} if hasattr(self, 'role') else {}))) | |
150 | |
151 def create(self, helper, do_upload_render_results, do_upload_bench_results, | |
152 do_trybots=True): | |
153 """Sets up a builder based on this configuration object. | |
154 | |
155 Args: | |
156 helper: instance of utils.SkiaHelper | |
157 do_upload_render_results: bool; whether the builder should upload its | |
158 render results. | |
159 do_upload_bench_results: bool; whether the builder should upload its | |
160 bench results. | |
161 is_trybot: bool; whether or not to create an associated try builder. | |
162 """ | |
163 self._create(helper, do_upload_render_results, do_upload_bench_results, | |
164 is_trybot=False) | |
165 if do_trybots: | |
166 self._create(helper, do_upload_render_results, do_upload_bench_results, | |
167 is_trybot=True) | |
168 | |
169 | |
170 BuilderConfig = collections.namedtuple( | |
171 'Builder', | |
172 ['role', 'os', 'model', 'gpu', 'arch', 'configuration', 'extra_config', | |
173 'gyp_defines', 'factory_type', 'target_platform', 'scheduler', | |
174 'extra_factory_args']) | |
175 | |
176 | |
177 CompileBuilderConfig = collections.namedtuple( | |
178 'CompileBuilder', | |
179 ['os', 'compiler', 'configuration', 'target_arch', 'extra_config', | |
180 'gyp_defines', 'warnings_as_errors', 'factory_type', 'target_platform', | |
181 'scheduler', 'extra_factory_args']) | |
182 | |
183 | |
184 HousekeepingBuilderConfig = collections.namedtuple( | |
185 'HousekeepingBuilder', | |
186 ['frequency', 'extra_config', 'factory_type', 'target_platform', | |
187 'scheduler', 'extra_factory_args']) | |
188 | |
189 | |
190 CanaryBuilderConfig = collections.namedtuple( | |
191 'CanaryBuilder', | |
192 ['project', 'os', 'compiler', 'target_arch', 'configuration', 'flavor', | |
193 'build_subdir', 'gyp_defines', 'factory_type', 'target_platform', | |
194 'scheduler', 'extra_factory_args']) | |
195 | |
196 | |
197 class Builder(BaseBuilder, BuilderConfig): | |
198 | |
199 @property | |
200 def factory_args(self): | |
201 args = { | |
202 'configuration': self.configuration, | |
203 'gyp_defines': get_gyp_defines(self.arch, self.gyp_defines), | |
204 'target_platform': self.target_platform, | |
205 'perf_output_basedir': | |
206 (PERF_OUTPUT_BASEDIR[self.target_platform] | |
207 if self.role == 'Perf' else None), | |
208 } | |
209 args.update(self.extra_factory_args) | |
210 return args | |
211 | |
212 | |
213 class CompileBuilder(BaseBuilder, CompileBuilderConfig): | |
214 | |
215 role = builder_name_schema.BUILDER_ROLE_BUILD | |
216 | |
217 @property | |
218 def factory_args(self): | |
219 args = { | |
220 'configuration': self.configuration, | |
221 'gyp_defines': get_gyp_defines(self.target_arch, self.gyp_defines), | |
222 'target_platform': self.target_platform, | |
223 'compile_warnings_as_errors': self.warnings_as_errors, | |
224 } | |
225 args.update(self.extra_factory_args) | |
226 return args | |
227 | |
228 | |
229 class HousekeepingBuilder(BaseBuilder, HousekeepingBuilderConfig): | |
230 | |
231 role = builder_name_schema.BUILDER_ROLE_HOUSEKEEPER | |
232 | |
233 @property | |
234 def factory_args(self): | |
235 args = {'target_platform': self.target_platform} | |
236 args.update(self.extra_factory_args) | |
237 return args | |
238 | |
239 | |
240 class CanaryBuilder(BaseBuilder, CanaryBuilderConfig): | |
241 | |
242 role = builder_name_schema.BUILDER_ROLE_CANARY | |
243 | |
244 @property | |
245 def factory_args(self): | |
246 args = { | |
247 'gyp_defines': eval(self.gyp_defines or 'None'), | |
248 'target_platform': self.target_platform, | |
249 'build_subdir': self.build_subdir, | |
250 } | |
251 args.update(self.extra_factory_args) | |
252 return args | |
253 | |
254 | |
255 def setup_builders_from_config_list(builder_specs, helper, | |
256 do_upload_render_results, | |
257 do_upload_bench_results, builder_format): | |
258 """Takes a list of tuples describing builders and creates actual builders. | |
259 | |
260 Args: | |
261 builder_specs: list of tuples following the one of the above formats. | |
262 helper: instance of utils.SkiaHelper | |
263 do_upload_render_results: bool; whether the builders should upload their | |
264 render results. | |
265 do_upload_bench_results: bool; whether the builders should upload their | |
266 bench results. | |
267 builder_format: one of the above formats. | |
268 """ | |
269 for builder_tuple in sorted(builder_specs): | |
270 builder = builder_format(*builder_tuple) | |
271 builder.create(helper, do_upload_render_results, do_upload_bench_results) | |
272 | |
273 | |
274 | |
275 def setup_test_and_perf_builders(helper, do_upload_render_results, | |
276 do_upload_bench_results): | |
277 """Set up the Test and Perf builders. | |
278 | |
279 Args: | |
280 helper: instance of utils.SkiaHelper | |
281 do_upload_render_results: bool; whether the builders should upload their | |
282 render results. | |
283 do_upload_bench_results: bool; whether the builders should upload their | |
284 bench results. | |
285 """ | |
286 # | |
287 # TEST AND PERF BUILDERS | |
288 # | |
289 # Role, OS, Model, GPU, Arch, Config,
Extra Config, GYP_DEFS, Factory, Target, Scheduler, Extra Args | |
290 # | |
291 builder_specs = [ | |
292 ('Test', 'Ubuntu12', 'ShuttleA', 'GTX660', 'x86', 'Debug',
None, None, f_factory, LINUX, S_PERCOMMIT, {}), | |
293 ('Test', 'Ubuntu12', 'ShuttleA', 'GTX660', 'x86', 'Release',
None, None, f_factory, LINUX, S_PERCOMMIT, {}), | |
294 ('Perf', 'Ubuntu12', 'ShuttleA', 'GTX660', 'x86', 'Release',
None, None, f_factory, LINUX, S_PERCOMMIT, {}), | |
295 ('Test', 'Ubuntu12', 'ShuttleA', 'GTX660', 'x86_64', 'Debug',
None, None, f_factory, LINUX, S_PERCOMMIT, {}), | |
296 ('Test', 'Ubuntu12', 'ShuttleA', 'GTX660', 'x86_64', 'Release',
None, None, f_factory, LINUX, S_PERCOMMIT, {}), | |
297 ('Perf', 'Ubuntu12', 'ShuttleA', 'GTX660', 'x86_64', 'Release',
None, None, f_factory, LINUX, S_PERCOMMIT, {}), | |
298 ('Test', 'Ubuntu12', 'ShuttleA', 'GTX550Ti', 'x86_64', 'Debug',
'ZeroGPUCache', None, f_factory, LINUX, S_PERCOMMIT, {}), | |
299 ('Test', 'Ubuntu12', 'ShuttleA', 'GTX550Ti', 'x86_64', 'Release',
'Valgrind', VALGRIND, f_factory, LINUX, S_PERCOMMIT, {'flavor': 'valgr
ind'}), | |
300 ('Test', 'Ubuntu13.10', 'GCE', 'NoGPU', 'x86_64', 'Debug',
None, NO_GPU, f_factory, LINUX, S_PERCOMMIT, {}), | |
301 ('Test', 'Ubuntu13.10', 'GCE', 'NoGPU', 'x86_64', 'Release',
'Shared', NO_GPU_SHARED, f_factory, LINUX, S_PERCOMMIT, {}), | |
302 ('Test', 'Ubuntu13.10', 'GCE', 'NoGPU', 'x86_64', 'Debug',
'ASAN', NO_GPU, f_xsan, LINUX, S_PERCOMMIT, {'sanitizer': 'ad
dress'}), | |
303 ('Test', 'Ubuntu13.10', 'GCE', 'NoGPU', 'x86_64', 'Release',
'TSAN', NO_GPU, f_xsan, LINUX, S_PERCOMMIT, {'sanitizer': 'th
read'}), | |
304 ('Test', 'Mac10.6', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Debug',
None, None, f_factory, MAC, S_PERCOMMIT, {}), | |
305 ('Test', 'Mac10.6', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Release',
None, None, f_factory, MAC, S_PERCOMMIT, {}), | |
306 ('Test', 'Mac10.7', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Debug',
None, None, f_factory, MAC, S_PERCOMMIT, {}), | |
307 ('Test', 'Mac10.7', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Release',
None, None, f_factory, MAC, S_PERCOMMIT, {}), | |
308 ('Perf', 'Mac10.7', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Release',
None, None, f_factory, MAC, S_PERCOMMIT, {}), | |
309 ('Test', 'Mac10.8', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Debug',
None, None, f_factory, MAC, S_PERCOMMIT, {}), | |
310 ('Test', 'Mac10.8', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Release',
None, PDFVIEWER, f_factory, MAC, S_PERCOMMIT, {}), | |
311 ('Perf', 'Mac10.8', 'MacMini4.1', 'GeForce320M', 'x86_64', 'Release',
None, PDFVIEWER, f_factory, MAC, S_PERCOMMIT, {}), | |
312 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Debug',
None, GYP_WIN7, f_factory, WIN32, S_PERCOMMIT, {}), | |
313 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Release',
None, GYP_WIN7, f_factory, WIN32, S_PERCOMMIT, {}), | |
314 ('Perf', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Release',
None, GYP_WIN7, f_factory, WIN32, S_PERCOMMIT, {}), | |
315 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86_64', 'Debug',
None, GYP_WIN7, f_factory, WIN32, S_PERCOMMIT, {}), | |
316 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86_64', 'Release',
None, GYP_WIN7, f_factory, WIN32, S_PERCOMMIT, {}), | |
317 ('Perf', 'Win7', 'ShuttleA', 'HD2000', 'x86_64', 'Release',
None, GYP_WIN7, f_factory, WIN32, S_PERCOMMIT, {}), | |
318 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Debug',
'ANGLE', GYP_ANGLE, f_factory, WIN32, S_PERCOMMIT, {}), | |
319 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Release',
'ANGLE', GYP_ANGLE, f_factory, WIN32, S_PERCOMMIT, {}), | |
320 ('Perf', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Release',
'ANGLE', GYP_ANGLE, f_factory, WIN32, S_PERCOMMIT, {}), | |
321 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Debug',
'GDI', GYP_GDI, f_factory, WIN32, S_PERCOMMIT, {}), | |
322 ('Test', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Release',
'GDI', GYP_GDI, f_factory, WIN32, S_PERCOMMIT, {}), | |
323 ('Perf', 'Win7', 'ShuttleA', 'HD2000', 'x86', 'Release',
'GDI', GYP_GDI, f_factory, WIN32, S_PERCOMMIT, {}), | |
324 ('Test', 'Win8', 'ShuttleA', 'GTX660', 'x86', 'Debug',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
325 ('Test', 'Win8', 'ShuttleA', 'GTX660', 'x86', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
326 ('Perf', 'Win8', 'ShuttleA', 'GTX660', 'x86', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
327 ('Test', 'Win8', 'ShuttleA', 'GTX660', 'x86_64', 'Debug',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
328 ('Test', 'Win8', 'ShuttleA', 'GTX660', 'x86_64', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
329 ('Perf', 'Win8', 'ShuttleA', 'GTX660', 'x86_64', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
330 ('Test', 'Win8', 'ShuttleA', 'HD7770', 'x86', 'Debug',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
331 ('Test', 'Win8', 'ShuttleA', 'HD7770', 'x86', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
332 ('Perf', 'Win8', 'ShuttleA', 'HD7770', 'x86', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
333 ('Test', 'Win8', 'ShuttleA', 'HD7770', 'x86_64', 'Debug',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
334 ('Test', 'Win8', 'ShuttleA', 'HD7770', 'x86_64', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
335 ('Perf', 'Win8', 'ShuttleA', 'HD7770', 'x86_64', 'Release',
None, GYP_WIN8, f_factory, WIN32, S_PERCOMMIT, {'build_targets':
['most']}), | |
336 ('Test', 'ChromeOS', 'Alex', 'GMA3150', 'x86', 'Debug',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'x86-al
ex'}), | |
337 ('Test', 'ChromeOS', 'Alex', 'GMA3150', 'x86', 'Release',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'x86-al
ex'}), | |
338 ('Perf', 'ChromeOS', 'Alex', 'GMA3150', 'x86', 'Release',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'x86-al
ex'}), | |
339 ('Test', 'ChromeOS', 'Link', 'HD4000', 'x86_64', 'Debug',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'link'}
), | |
340 ('Test', 'ChromeOS', 'Link', 'HD4000', 'x86_64', 'Release',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'link'}
), | |
341 ('Perf', 'ChromeOS', 'Link', 'HD4000', 'x86_64', 'Release',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'link'}
), | |
342 ('Test', 'ChromeOS', 'Daisy', 'MaliT604', 'Arm7', 'Debug',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'daisy'
}), | |
343 ('Test', 'ChromeOS', 'Daisy', 'MaliT604', 'Arm7', 'Release',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'daisy'
}), | |
344 ('Perf', 'ChromeOS', 'Daisy', 'MaliT604', 'Arm7', 'Release',
None, None, f_cros, LINUX, S_PERCOMMIT, {'board': 'daisy'
}), | |
345 ] | |
346 | |
347 setup_builders_from_config_list(builder_specs, helper, | |
348 do_upload_render_results, | |
349 do_upload_bench_results, Builder) | |
350 | |
351 | |
352 def setup_canaries(helper, do_upload_render_results, do_upload_bench_results): | |
353 """Set up the Canary builders. | |
354 | |
355 Args: | |
356 helper: instance of utils.SkiaHelper | |
357 do_upload_render_results: bool; whether the builders should upload their | |
358 render results. | |
359 do_upload_bench_results: bool; whether the builders should upload their | |
360 bench results. | |
361 """ | |
362 # Targets which we think are important for the Chrome canaries. Discussion: | |
363 # https://code.google.com/p/skia/issues/detail?id=2227 | |
364 common_chrome_build_targets = [ | |
365 'chrome', 'base_unittests', 'cacheinvalidation_unittests', | |
366 'cc_unittests', 'chromedriver_unittests', 'components_unittests', | |
367 'content_unittests', 'crypto_unittests', 'google_apis_unittests', | |
368 'gpu_unittests', 'ipc_tests', 'jingle_unittests', 'media_unittests', | |
369 'net_unittests', 'ppapi_unittests', 'printing_unittests', | |
370 'remoting_unittests', 'sql_unittests', 'sync_unit_tests', 'ui_unittests', | |
371 'unit_tests', 'content_browsertests', 'interactive_ui_tests', | |
372 'sync_integration_tests' | |
373 ] | |
374 # browser_tests fails on the windows canary. More details in | |
375 # https://code.google.com/p/skia/issues/detail?id=2863 | |
376 linux_chrome_build_targets = common_chrome_build_targets + ['browser_tests'] | |
377 win_chrome_build_targets = common_chrome_build_targets | |
378 # | |
379 # CANARY BUILDERS | |
380 # | |
381 # Project, OS, Compiler,Arch, Configuration, Flavor, Wor
kdir,GYP_DEFINES,Factory, Target, Scheduler, Extra Args | |
382 # | |
383 canaries = [ | |
384 ('Chrome', 'Ubuntu13.10', 'Ninja', 'x86_64', 'DRT', None, '
src', None, f_drt, LINUX, S_PERCOMMIT, {'path_to_skia': ['third_party
', 'skia']}), | |
385 ('Chrome', 'Ubuntu13.10', 'Ninja', 'x86_64', 'ToT', 'chrome', '
src', None, f_canary, LINUX, S_PERCOMMIT, {'flavor': 'chrome', 'build_ta
rgets': linux_chrome_build_targets, 'path_to_skia': ['third_party', 'skia']}), | |
386 ('Chrome', 'Win', 'Ninja', 'x86', 'SharedLib_ToT', 'chrome', '
src', GYP_SHARED, f_canary, WIN32, S_PERCOMMIT, {'flavor': 'chrome', 'build_ta
rgets': win_chrome_build_targets, 'path_to_skia': ['third_party', 'skia']}), | |
387 ] | |
388 | |
389 setup_builders_from_config_list(canaries, helper, do_upload_render_results, | |
390 do_upload_bench_results, CanaryBuilder) | |
391 | |
392 | |
393 def setup_all_builders(helper, do_upload_render_results, | |
394 do_upload_bench_results): | |
395 """Set up all builders for this master. | |
396 | |
397 Args: | |
398 helper: instance of utils.SkiaHelper | |
399 do_upload_render_results: bool; whether the builders should upload their | |
400 render results. | |
401 do_upload_bench_results: bool; whether the builders should upload their | |
402 bench results. | |
403 """ | |
404 setup_test_and_perf_builders( | |
405 helper=helper, | |
406 do_upload_render_results=do_upload_render_results, | |
407 do_upload_bench_results=do_upload_bench_results) | |
408 setup_canaries(helper=helper, | |
409 do_upload_render_results=do_upload_render_results, | |
410 do_upload_bench_results=do_upload_bench_results) | |
411 | |
412 | |
413 def create_schedulers_and_builders(config, active_master, cfg, | |
414 builder_setup_func=setup_all_builders): | |
415 """Create the Schedulers and Builders. | |
416 | |
417 Args: | |
418 config: buildbot config module. | |
419 active_master: class of the current build master. | |
420 cfg: dict; configuration dict for the build master. | |
421 builder_setup_func: function to call which sets up the builders for this | |
422 master. Defaults to setup_all_builders. | |
423 """ | |
424 helper = utils.SkiaHelper(defaults) | |
425 | |
426 # Default (per-commit) Scheduler for Skia. | |
427 helper.Scheduler(S_PERCOMMIT) | |
428 | |
429 # Nightly Scheduler for Skia. The buildbot master follows UTC. | |
430 # Setting it to 3AM UTC (10 PM EST). | |
431 helper.PeriodicScheduler(S_NIGHTLY, minute=0, hour=3) | |
432 | |
433 # Scheduler which fires every 15 minutes. | |
434 frequency_mins = 15 | |
435 minutes = [i*frequency_mins for i in xrange(60/frequency_mins)] | |
436 helper.PeriodicScheduler(S_15MINS, minute=minutes) | |
437 | |
438 # Schedulers for Skia trybots. | |
439 helper.TryJobSubversion(utils.TRY_SCHEDULER_SVN) | |
440 helper.TryJobRietveld(utils.TRY_SCHEDULER_RIETVELD) | |
441 | |
442 # Call the passed-in builder setup function. | |
443 builder_setup_func( | |
444 helper=helper, | |
445 # TODO(epoger): Maybe pass the following "tweaks" as a single object, | |
446 # rather than requiring us to list them all out? | |
447 # | |
448 # To resolve https://code.google.com/p/skia/issues/detail?id=2432 | |
449 # ('buildbots: don't run UpdateScripts if running on non-production | |
450 # master'), I wanted to add a third boolean flag (do_update_scripts), | |
451 # but I saw that I would need to add it in so many places I was | |
452 # discouraged. If the merged all the flags into a single object it | |
453 # would be easier to add more flags. | |
454 do_upload_render_results=active_master.do_upload_render_results, | |
455 do_upload_bench_results=active_master.do_upload_bench_results) | |
456 | |
457 return helper.Update(cfg) | |
OLD | NEW |