aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipes/ct_skps.py
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2018-05-18 07:36:55 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-18 11:58:14 +0000
commit72f6668eb73405874155b7b03077230559ee681e (patch)
tree4dc8de37518a9e442ac8ec15f727fd32c6b312a4 /infra/bots/recipes/ct_skps.py
parent50edafacc8ea56bdc13fd2234618fe06094eec0e (diff)
[recipes] Move a lot of logic out of vars module
In general, vars should only contain variables which are the same for all tasks. Variables specific to compilation belong in the build module (or compile recipe), and those specific to running tests belong in the flavor module, or the individual recipe which uses them. Bug: skia:6473 Change-Id: Ifd55a57118c5801e6f4934a6b5de9d1567415b9a Reviewed-on: https://skia-review.googlesource.com/128545 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/recipes/ct_skps.py')
-rw-r--r--infra/bots/recipes/ct_skps.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/infra/bots/recipes/ct_skps.py b/infra/bots/recipes/ct_skps.py
index ae70e7fc72..5a679d30b5 100644
--- a/infra/bots/recipes/ct_skps.py
+++ b/infra/bots/recipes/ct_skps.py
@@ -75,21 +75,22 @@ def RunSteps(api):
else:
raise Exception('Do not recognise the buildername %s.' % buildername)
- api.vars.override_checkout_root = make_path(api, '/', 'b', 'work')
- api.vars.override_gclient_cache = make_path(api, '/', 'b', 'cache')
-
api.vars.setup()
- api.core.checkout_bot_update()
+ checkout_root = make_path(api, '/', 'b', 'work')
+ gclient_cache = make_path(api, '/', 'b', 'cache')
+ got_revision = api.core.checkout_bot_update(checkout_root=checkout_root,
+ gclient_cache=gclient_cache)
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
- api.build()
+ out_dir = api.vars.build_dir.join('out', api.vars.configuration)
+ api.build(checkout_root=checkout_root, out_dir=out_dir)
# Required paths.
- infrabots_dir = api.vars.skia_dir.join('infra', 'bots')
+ infrabots_dir = checkout_root.join('skia', 'infra', 'bots')
isolate_dir = infrabots_dir.join('ct')
isolate_path = isolate_dir.join(CT_SKPS_ISOLATE)
- api.build.copy_build_products(isolate_dir)
+ api.build.copy_build_products(out_dir=out_dir, dst=isolate_dir)
api.skia_swarming.setup(
infrabots_dir.join('tools', 'luci-go'),
swarming_rev='')
@@ -131,8 +132,8 @@ def RunSteps(api):
# referenced also needs to change. As of 8/8/17 the other places are:
# * infra/bots/ct/ct_skps.isolate
# * infra/bots/ct/run_ct_skps.py
- skps_dir = api.vars.checkout_root.join('skps', skps_chromium_build,
- ct_page_type, str(ct_num_slaves))
+ skps_dir = checkout_root.join('skps', skps_chromium_build,
+ ct_page_type, str(ct_num_slaves))
version_file = skps_dir.join(SKPS_VERSION_FILE)
if api.path.exists(version_file): # pragma: nocover
version_file_contents = api.file.read_text(
@@ -150,7 +151,7 @@ def RunSteps(api):
'makedirs %s' % api.path.basename(skps_dir), skps_dir)
# If a blacklist file exists then specify SKPs to be blacklisted.
- blacklists_dir = api.vars.skia_dir.join('infra', 'bots', 'ct', 'blacklists')
+ blacklists_dir = infrabots_dir.join('ct', 'blacklists')
blacklist_file = blacklists_dir.join(
'%s_%s_%s.json' % (skia_tool, ct_page_type, skps_chromium_build))
blacklist_skps = []
@@ -173,7 +174,7 @@ def RunSteps(api):
extra_variables = {
'SLAVE_NUM': str(slave_num),
'TOOL_NAME': skia_tool,
- 'GIT_HASH': api.vars.got_revision,
+ 'GIT_HASH': got_revision,
'CONFIGURATION': api.vars.configuration,
'BUILDER': buildername,
'CHROMIUM_BUILD': skps_chromium_build,