| 1 |
# Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 |
# Use of this source code is governed by a BSD-style license that can be |
| 3 |
# found in the LICENSE file. |
| 4 |
|
| 5 |
|
| 6 |
DEPS = [ |
| 7 |
'env', |
| 8 |
'recipe_engine/context', |
| 9 |
'recipe_engine/step', |
| 10 |
] |
| 11 |
|
| 12 |
|
| 13 |
def RunSteps(api): |
| 14 |
api.step('1', cmd=['echo', 'hi']) |
| 15 |
with api.env({'MYVAR': 'myval'}): |
| 16 |
api.step('2', cmd=['echo', 'hi']) |
| 17 |
|
| 18 |
path = 'mypath:%(PATH)s' |
| 19 |
with api.context(env={'PATH': path}): |
| 20 |
api.step('3', cmd=['echo', 'hi']) |
| 21 |
with api.env({'PATH': '%(PATH)s:otherpath'}): |
| 22 |
api.step('4', cmd=['echo', 'hi']) |
| 23 |
|
| 24 |
|
| 25 |
def GenTests(api): |
| 26 |
yield api.test('test') |