diff options
author | 2017-04-24 13:22:56 -0400 | |
---|---|---|
committer | 2017-04-24 17:45:46 +0000 | |
commit | 896af751f8ed58832d6f5ec87227a1781d6bdcb2 (patch) | |
tree | 30525d67a9b2e4b153e2091d2ef7eec7289ba70c /infra/bots/recipes/test.py | |
parent | 4a395049a977d7e04515bad490365fe9ec9ffaab (diff) |
[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 <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipes/test.py')
-rw-r--r-- | infra/bots/recipes/test.py | 7 |
1 files changed, 4 insertions, 3 deletions
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: |