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

Side by Side Diff: scripts/slave/recipes/blink_trybot.py

Issue 688473003: Added swarming step to the Blink trybots (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Added/modified tests for 100% coverage 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipes/blink_trybot.expected/blink_heap_unittests_failure.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 DEPS = [ 5 DEPS = [
6 'bot_update', 6 'bot_update',
7 'chromium', 7 'chromium',
8 'gclient', 8 'gclient',
9 'isolate',
9 'json', 10 'json',
10 'path', 11 'path',
11 'platform', 12 'platform',
12 'properties', 13 'properties',
13 'python', 14 'python',
14 'raw_io', 15 'raw_io',
15 'rietveld', 16 'rietveld',
16 'step', 17 'step',
18 'swarming',
17 'test_utils', 19 'test_utils',
18 ] 20 ]
19 21
20 22
21 BUILDERS = { 23 BUILDERS = {
22 'tryserver.blink': { 24 'tryserver.blink': {
23 'builders': { 25 'builders': {
24 'linux_blink_dbg': { 26 'linux_blink_dbg': {
25 'chromium_config_kwargs': { 27 'chromium_config_kwargs': {
26 'BUILD_CONFIG': 'Debug', 28 'BUILD_CONFIG': 'Debug',
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 webkit_lint = api.path['build'].join('scripts', 'slave', 'chromium', 266 webkit_lint = api.path['build'].join('scripts', 'slave', 'chromium',
265 'lint_test_files_wrapper.py') 267 'lint_test_files_wrapper.py')
266 webkit_python_tests = api.path['build'].join('scripts', 'slave', 'chromium', 268 webkit_python_tests = api.path['build'].join('scripts', 'slave', 'chromium',
267 'test_webkitpy_wrapper.py') 269 'test_webkitpy_wrapper.py')
268 270
269 # Set patch_root used when applying the patch after checkout. Default None 271 # Set patch_root used when applying the patch after checkout. Default None
270 # makes bot_update determine the patch_root from tryserver root, e.g. 'src'. 272 # makes bot_update determine the patch_root from tryserver root, e.g. 'src'.
271 bot_update_step = api.bot_update.ensure_checkout( 273 bot_update_step = api.bot_update.ensure_checkout(
272 force=True, patch_root=bot_config.get('root_override')) 274 force=True, patch_root=bot_config.get('root_override'))
273 275
274 api.chromium.runhooks() 276 if bot_config['compile_only']:
275 api.chromium.compile() 277 api.chromium.runhooks()
278 api.chromium.compile()
279 else:
280 api.swarming.set_default_dimension('pool', 'Chrome')
Paweł Hajdan Jr. 2014/10/29 10:14:46 This seems duplicated from chromium_trybot.py reci
Sergiy Byelozyorov 2014/10/29 13:01:25 Done.
281 api.swarming.add_default_tag('project:blink')
282 api.swarming.add_default_tag('purpose:pre-commit')
283 api.swarming.default_idempotent = True
276 284
277 if not bot_config['compile_only']: 285 requester = api.properties.get('requester')
286 if requester == 'commit-bot@chromium.org':
287 api.swarming.default_priority = 30
288 api.swarming.add_default_tag('purpose:CQ')
289 blamelist = api.properties.get('blamelist')
290 if len(blamelist) == 1:
291 requester = blamelist[0]
292 else:
293 api.swarming.default_priority = 50
294 api.swarming.add_default_tag('purpose:ManualTS')
295 api.swarming.default_user = requester
296
297 # Swarming uses Isolate to transfer files to swarming bots.
298 # set_isolate_environment modifies GYP_DEFINES to enable test isolation.
299 api.isolate.set_isolate_environment(api.chromium.c)
300
301 # Ensure swarming_client is compatible with what recipes expect.
302 api.swarming.check_client_version()
303
304 api.chromium.runhooks()
305
306 api.isolate.clean_isolated_files(api.chromium.output_dir)
307 api.chromium.compile()
308 api.isolate.find_isolated_tests(api.chromium.output_dir)
309
278 api.python('webkit_lint', webkit_lint, [ 310 api.python('webkit_lint', webkit_lint, [
279 '--build-dir', api.path['checkout'].join('out'), 311 '--build-dir', api.path['checkout'].join('out'),
280 '--target', api.chromium.c.BUILD_CONFIG 312 '--target', api.chromium.c.BUILD_CONFIG
281 ]) 313 ])
282 api.python('webkit_python_tests', webkit_python_tests, [ 314 api.python('webkit_python_tests', webkit_python_tests, [
283 '--build-dir', api.path['checkout'].join('out'), 315 '--build-dir', api.path['checkout'].join('out'),
284 '--target', api.chromium.c.BUILD_CONFIG, 316 '--target', api.chromium.c.BUILD_CONFIG,
285 ]) 317 ])
286 318
287 # TODO(martiniss) this is pretty goofy 319 # TODO(martiniss) this is pretty goofy
(...skipping 22 matching lines...) Expand all
310 except api.step.StepFailure as f: 342 except api.step.StepFailure as f:
311 failed = True 343 failed = True
312 exception = f 344 exception = f
313 345
314 if failed: 346 if failed:
315 api.python.inline( 347 api.python.inline(
316 'Aborting due to failed build state', 348 'Aborting due to failed build state',
317 "import sys; sys.exit(1)") 349 "import sys; sys.exit(1)")
318 raise exception 350 raise exception
319 351
320 if not bot_config['compile_only']:
321 def deapply_patch_fn(_failing_steps): 352 def deapply_patch_fn(_failing_steps):
322 bot_update_json = bot_update_step.json.output 353 bot_update_json = bot_update_step.json.output
323 api.gclient.c.revisions['src'] = str( 354 api.gclient.c.revisions['src'] = str(
324 bot_update_json['properties']['got_revision']) 355 bot_update_json['properties']['got_revision'])
325 api.gclient.c.revisions['src/third_party/WebKit'] = str( 356 api.gclient.c.revisions['src/third_party/WebKit'] = str(
326 bot_update_json['properties']['got_webkit_revision']) 357 bot_update_json['properties']['got_webkit_revision'])
327 358
328 api.bot_update.ensure_checkout(patch=False, force=True) 359 api.bot_update.ensure_checkout(patch=False, force=True)
329 api.chromium.runhooks() 360 api.chromium.runhooks()
361 api.isolate.clean_isolated_files(api.chromium.output_dir)
330 api.chromium.compile() 362 api.chromium.compile()
363 api.isolate.find_isolated_tests(api.chromium.output_dir)
331 364
332 api.test_utils.determine_new_failures( 365 api.test_utils.determine_new_failures(
333 api, [api.chromium.steps.BlinkTest(api)], deapply_patch_fn) 366 api, [api.chromium.steps.BlinkTest(api)], deapply_patch_fn)
334 367
335 368
336 def _sanitize_nonalpha(text): 369 def _sanitize_nonalpha(text):
337 return ''.join(c if c.isalnum() else '_' for c in text) 370 return ''.join(c if c.isalnum() else '_' for c in text)
338 371
339 372
340 def GenTests(api): 373 def GenTests(api):
(...skipping 20 matching lines...) Expand all
361 api.test(test_name + ('_pass' if pass_first else '_fail')) + 394 api.test(test_name + ('_pass' if pass_first else '_fail')) +
362 api.step_data(with_patch, canned_test(passing=pass_first)) 395 api.step_data(with_patch, canned_test(passing=pass_first))
363 ) 396 )
364 if not pass_first: 397 if not pass_first:
365 test += api.step_data( 398 test += api.step_data(
366 without_patch, canned_test(passing=False, minimal=True)) 399 without_patch, canned_test(passing=False, minimal=True))
367 tests.append(test) 400 tests.append(test)
368 401
369 for test in tests: 402 for test in tests:
370 test += ( 403 test += (
371 properties(mastername, buildername) + 404 properties(mastername, buildername,
405 blamelist_real=['someone@chromium.org']) +
372 api.platform(bot_config['testing']['platform'], 406 api.platform(bot_config['testing']['platform'],
373 bot_config.get( 407 bot_config.get(
374 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) 408 'chromium_config_kwargs', {}).get('TARGET_BITS', 64))
375 ) 409 )
376 410
377 yield test 411 yield test
378 412
379 # This tests that if the first fails, but the second pass succeeds 413 # This tests that if the first fails, but the second pass succeeds
380 # that we fail the whole build. 414 # that we fail the whole build.
381 yield ( 415 yield (
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 # and compare the lists of failing tests). 465 # and compare the lists of failing tests).
432 yield ( 466 yield (
433 api.test('too_many_failures_for_retcode') + 467 api.test('too_many_failures_for_retcode') +
434 properties('tryserver.blink', 'linux_blink_rel') + 468 properties('tryserver.blink', 'linux_blink_rel') +
435 api.override_step_data(with_patch, 469 api.override_step_data(with_patch,
436 canned_test(passing=False, 470 canned_test(passing=False,
437 num_additional_failures=125)) + 471 num_additional_failures=125)) +
438 api.override_step_data(without_patch, 472 api.override_step_data(without_patch,
439 canned_test(passing=True, minimal=True)) 473 canned_test(passing=True, minimal=True))
440 ) 474 )
475
476 yield (
477 api.test('non_cq_tryjob') +
478 properties('tryserver.blink', 'win_blink_rel',
479 requester='someone@chromium.org') +
480 api.step_data(with_patch, canned_test(passing=True))
481 )
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/blink_trybot.expected/blink_heap_unittests_failure.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698