From 72f6668eb73405874155b7b03077230559ee681e Mon Sep 17 00:00:00 2001 From: Eric Boren Date: Fri, 18 May 2018 07:36:55 -0400 Subject: [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 Reviewed-by: Ben Wagner --- infra/bots/recipe_modules/build/flutter.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'infra/bots/recipe_modules/build/flutter.py') diff --git a/infra/bots/recipe_modules/build/flutter.py b/infra/bots/recipe_modules/build/flutter.py index fee92c1621..e1fc52e25f 100644 --- a/infra/bots/recipe_modules/build/flutter.py +++ b/infra/bots/recipe_modules/build/flutter.py @@ -3,11 +3,10 @@ # found in the LICENSE file. -def compile_fn(api, _): - flutter_dir = api.vars.checkout_root.join('src') +def compile_fn(api, checkout_root, out_dir): + flutter_dir = checkout_root.join('src') configuration = api.vars.builder_cfg.get('configuration').lower() extra_tokens = api.vars.extra_tokens - out_dir = configuration with api.context(cwd=flutter_dir): # Setup GN args. @@ -16,10 +15,9 @@ def compile_fn(api, _): ] if 'Android' in extra_tokens: gn_args.append('--android') - out_dir = 'android_' + out_dir # Delete out_dir so that we start from a clean slate. See skbug/6310. - api.run.rmtree(flutter_dir.join('out', out_dir)) + api.run.rmtree(out_dir) # Run GN. api.run( @@ -31,7 +29,7 @@ def compile_fn(api, _): api.run( api.step, 'build_flutter', - cmd=['ninja', '-C', 'out/' + out_dir, '-j100']) + cmd=['ninja', '-C', out_dir, '-j100']) def copy_extra_build_products(api, src, dst): -- cgit v1.2.3