diff options
Diffstat (limited to 'infra/bots/recipe_modules/git/examples')
-rw-r--r-- | infra/bots/recipe_modules/git/examples/full.expected/test.json | 24 | ||||
-rw-r--r-- | infra/bots/recipe_modules/git/examples/full.py | 19 |
2 files changed, 43 insertions, 0 deletions
diff --git a/infra/bots/recipe_modules/git/examples/full.expected/test.json b/infra/bots/recipe_modules/git/examples/full.expected/test.json new file mode 100644 index 0000000000..2f5fa0ef13 --- /dev/null +++ b/infra/bots/recipe_modules/git/examples/full.expected/test.json @@ -0,0 +1,24 @@ +[ + { + "cmd": [ + "git", + "status" + ], + "name": "1" + }, + { + "cmd": [ + "git", + "status" + ], + "env": { + "PATH": "[START_DIR]/git:[START_DIR]/git/bin:<PATH>" + }, + "name": "2" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/git/examples/full.py b/infra/bots/recipe_modules/git/examples/full.py new file mode 100644 index 0000000000..a24d903cd5 --- /dev/null +++ b/infra/bots/recipe_modules/git/examples/full.py @@ -0,0 +1,19 @@ +# 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 = [ + 'git', + 'recipe_engine/step', +] + + +def RunSteps(api): + api.step('1', cmd=['git', 'status']) + with api.git.env(): + api.step('2', cmd=['git', 'status']) + + +def GenTests(api): + yield api.test('test') |