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

Unified Diff: scripts/slave/recipes/blink_downstream.py

Issue 2171733002: blink_downstream: prepare for remote_run conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: review Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipes/blink_downstream.py
diff --git a/scripts/slave/recipes/blink_downstream.py b/scripts/slave/recipes/blink_downstream.py
index 2c137c26ae26bb93fefb6bdfb9c41120ee62a2b0..f2ac6d21d142180a5d3c1cc99f064a2cd85eaff3 100644
--- a/scripts/slave/recipes/blink_downstream.py
+++ b/scripts/slave/recipes/blink_downstream.py
@@ -131,50 +131,61 @@ def RunSteps(api):
# Ensure we remember the chromium revision.
api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision'
- step_result = api.bot_update.ensure_checkout(force=True)
+ context = {}
+ checkout_dir = api.chromium_tests.get_checkout_dir(bot_config)
+ if checkout_dir:
+ context['cwd'] = checkout_dir
- api.chromium.c.project_generator.tool = 'mb'
- api.chromium.runhooks()
+ # Run all steps in the checkout dir (consistent with chromium_tests).
+ with api.step.context(context):
+ # TODO(phajdan.jr): remove redundant **context below once we fix things
+ # to behave the same without it.
+ step_result = api.bot_update.ensure_checkout(force=True, **context)
- api.chromium_tests.run_mb_and_compile(
- ['blink_tests'], [],
- name_suffix=' (with patch)',
- )
-
- api.chromium.runtest('webkit_unit_tests', xvfb=True)
+ api.chromium.ensure_goma()
- def component_pinned_fn(_failing_steps):
- bot_update_json = step_result.json.output
- api.gclient.c.revisions['src'] = str(
- bot_update_json['properties']['got_cr_revision'])
- # Reset component revision to the pinned revision from chromium's DEPS
- # for comparison.
- del api.gclient.c.revisions[bot_config['component']['path']]
- # Update without changing got_revision. The first sync is the revision
- # that is tested. The second is just for comparison. Setting got_revision
- # again confuses the waterfall's console view.
- api.bot_update.ensure_checkout(force=True, update_presentation=False)
+ api.chromium.c.project_generator.tool = 'mb'
+ api.chromium.runhooks()
api.chromium_tests.run_mb_and_compile(
['blink_tests'], [],
- name_suffix=' (without patch)',
+ name_suffix=' (with patch)',
)
- extra_args = list(bot_config.get('test_args', []))
- if bot_config.get('additional_expectations'):
- extra_args.extend([
- '--additional-expectations',
- api.path['checkout'].join(*bot_config['additional_expectations']),
- ])
-
- tests = [
- api.chromium_tests.steps.BlinkTest(extra_args=extra_args),
- ]
-
- if 'ignition' in buildername:
- determine_new_ignition_failures(api, extra_args)
- else:
- api.test_utils.determine_new_failures(api, tests, component_pinned_fn)
+ api.chromium.runtest('webkit_unit_tests', xvfb=True)
+
+ def component_pinned_fn(_failing_steps):
+ bot_update_json = step_result.json.output
+ api.gclient.c.revisions['src'] = str(
+ bot_update_json['properties']['got_cr_revision'])
+ # Reset component revision to the pinned revision from chromium's DEPS
+ # for comparison.
+ del api.gclient.c.revisions[bot_config['component']['path']]
+ # Update without changing got_revision. The first sync is the revision
+ # that is tested. The second is just for comparison. Setting got_revision
+ # again confuses the waterfall's console view.
+ api.bot_update.ensure_checkout(force=True, update_presentation=False)
+
+ api.chromium_tests.run_mb_and_compile(
+ ['blink_tests'], [],
+ name_suffix=' (without patch)',
+ )
+
+ extra_args = list(bot_config.get('test_args', []))
+ if bot_config.get('additional_expectations'):
+ extra_args.extend([
+ '--additional-expectations',
+ api.path['checkout'].join(*bot_config['additional_expectations']),
+ ])
+
+ tests = [
+ api.chromium_tests.steps.BlinkTest(extra_args=extra_args),
+ ]
+
+ if 'ignition' in buildername:
+ determine_new_ignition_failures(api, extra_args)
+ else:
+ api.test_utils.determine_new_failures(api, tests, component_pinned_fn)
def _sanitize_nonalpha(text):
@@ -190,7 +201,8 @@ def GenTests(api):
return (
api.properties.generic(mastername=mastername,
buildername=buildername,
- revision='20123')
+ revision='20123',
+ path_config='kitchen')
)
for mastername, master_config in BUILDERS.iteritems():

Powered by Google App Engine
This is Rietveld 408576698