Chromium Code Reviews| Index: scripts/slave/recipes/blink_trybot.py |
| diff --git a/scripts/slave/recipes/blink_trybot.py b/scripts/slave/recipes/blink_trybot.py |
| index 9e8d6e06a268c2bc06328a972e69447b87733885..ed9c49edd42f9530841eccedc958611102f25151 100644 |
| --- a/scripts/slave/recipes/blink_trybot.py |
| +++ b/scripts/slave/recipes/blink_trybot.py |
| @@ -6,6 +6,7 @@ DEPS = [ |
| 'bot_update', |
| 'chromium', |
| 'gclient', |
| + 'isolate', |
| 'json', |
| 'path', |
| 'platform', |
| @@ -14,6 +15,7 @@ DEPS = [ |
| 'raw_io', |
| 'rietveld', |
| 'step', |
| + 'swarming', |
| 'test_utils', |
| ] |
| @@ -271,10 +273,40 @@ def GenSteps(api): |
| bot_update_step = api.bot_update.ensure_checkout( |
| force=True, patch_root=bot_config.get('root_override')) |
| - api.chromium.runhooks() |
| - api.chromium.compile() |
| + if bot_config['compile_only']: |
| + api.chromium.runhooks() |
| + api.chromium.compile() |
| + else: |
| + 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.
|
| + api.swarming.add_default_tag('project:blink') |
| + api.swarming.add_default_tag('purpose:pre-commit') |
| + api.swarming.default_idempotent = True |
| + |
| + requester = api.properties.get('requester') |
| + if requester == 'commit-bot@chromium.org': |
| + api.swarming.default_priority = 30 |
| + api.swarming.add_default_tag('purpose:CQ') |
| + blamelist = api.properties.get('blamelist') |
| + if len(blamelist) == 1: |
| + requester = blamelist[0] |
| + else: |
| + api.swarming.default_priority = 50 |
| + api.swarming.add_default_tag('purpose:ManualTS') |
| + api.swarming.default_user = requester |
| + |
| + # Swarming uses Isolate to transfer files to swarming bots. |
| + # set_isolate_environment modifies GYP_DEFINES to enable test isolation. |
| + api.isolate.set_isolate_environment(api.chromium.c) |
| + |
| + # Ensure swarming_client is compatible with what recipes expect. |
| + api.swarming.check_client_version() |
| + |
| + api.chromium.runhooks() |
| + |
| + api.isolate.clean_isolated_files(api.chromium.output_dir) |
| + api.chromium.compile() |
| + api.isolate.find_isolated_tests(api.chromium.output_dir) |
| - if not bot_config['compile_only']: |
| api.python('webkit_lint', webkit_lint, [ |
| '--build-dir', api.path['checkout'].join('out'), |
| '--target', api.chromium.c.BUILD_CONFIG |
| @@ -317,7 +349,6 @@ def GenSteps(api): |
| "import sys; sys.exit(1)") |
| raise exception |
| - if not bot_config['compile_only']: |
| def deapply_patch_fn(_failing_steps): |
| bot_update_json = bot_update_step.json.output |
| api.gclient.c.revisions['src'] = str( |
| @@ -327,7 +358,9 @@ def GenSteps(api): |
| api.bot_update.ensure_checkout(patch=False, force=True) |
| api.chromium.runhooks() |
| + api.isolate.clean_isolated_files(api.chromium.output_dir) |
| api.chromium.compile() |
| + api.isolate.find_isolated_tests(api.chromium.output_dir) |
| api.test_utils.determine_new_failures( |
| api, [api.chromium.steps.BlinkTest(api)], deapply_patch_fn) |
| @@ -368,7 +401,8 @@ def GenTests(api): |
| for test in tests: |
| test += ( |
| - properties(mastername, buildername) + |
| + properties(mastername, buildername, |
| + blamelist_real=['someone@chromium.org']) + |
| api.platform(bot_config['testing']['platform'], |
| bot_config.get( |
| 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) |
| @@ -438,3 +472,10 @@ def GenTests(api): |
| api.override_step_data(without_patch, |
| canned_test(passing=True, minimal=True)) |
| ) |
| + |
| + yield ( |
| + api.test('non_cq_tryjob') + |
| + properties('tryserver.blink', 'win_blink_rel', |
| + requester='someone@chromium.org') + |
| + api.step_data(with_patch, canned_test(passing=True)) |
| + ) |