From 896af751f8ed58832d6f5ec87227a1781d6bdcb2 Mon Sep 17 00:00:00 2001 From: Eric Boren Date: Mon, 24 Apr 2017 13:22:56 -0400 Subject: [recipes] Add env recipe module Simplifies the process of nesting environments. Usage: with api.env({'myvar': 'myval'}): # do stuff Same as api.step.context but specialized for just environment and merges PATH variable intelligently. Bug: skia:6473 Change-Id: I5769c69cbbbcdab0c6298cee6c5e1fe9caf89c78 Reviewed-on: https://skia-review.googlesource.com/14189 Reviewed-by: Kevin Lubick Commit-Queue: Eric Boren --- infra/bots/recipes/test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'infra/bots/recipes/test.py') diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py index 5a21bd6eb1..8625b11bcb 100644 --- a/infra/bots/recipes/test.py +++ b/infra/bots/recipes/test.py @@ -9,6 +9,8 @@ DEPS = [ 'build/file', 'core', + 'env', + 'flavor', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/platform', @@ -16,7 +18,6 @@ DEPS = [ 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', - 'flavor', 'run', 'vars', ] @@ -647,7 +648,7 @@ def test_steps(api): args.append(skip_flag) args.extend(dm_flags(api.vars.builder_name)) - env = api.step.get_from_context('env', {}) + env = {} if 'Ubuntu16' in api.vars.builder_name: # The vulkan in this asset name simply means that the graphics driver # supports Vulkan. It is also the driver used for GL code. @@ -677,7 +678,7 @@ def test_steps(api): if '_PreAbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''): args.append('--preAbandonGpuContext') - with api.step.context({'env': env}): + with api.env(env): api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False) if api.vars.upload_dm_results: -- cgit v1.2.3