2017-04-24 17:22:56 +00:00
|
|
|
# Copyright 2017 The Chromium Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
|
|
DEPS = [
|
|
|
|
'env',
|
2017-05-13 02:09:38 +00:00
|
|
|
'recipe_engine/context',
|
2017-04-24 17:22:56 +00:00
|
|
|
'recipe_engine/step',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def RunSteps(api):
|
|
|
|
api.step('1', cmd=['echo', 'hi'])
|
|
|
|
with api.env({'MYVAR': 'myval'}):
|
|
|
|
api.step('2', cmd=['echo', 'hi'])
|
|
|
|
|
|
|
|
path = 'mypath:%(PATH)s'
|
2017-05-13 02:09:38 +00:00
|
|
|
with api.context(env={'PATH': path}):
|
2017-04-24 17:22:56 +00:00
|
|
|
api.step('3', cmd=['echo', 'hi'])
|
|
|
|
with api.env({'PATH': '%(PATH)s:otherpath'}):
|
|
|
|
api.step('4', cmd=['echo', 'hi'])
|
|
|
|
|
|
|
|
|
|
|
|
def GenTests(api):
|
|
|
|
yield api.test('test')
|