OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 DEPS = [ | 5 DEPS = [ |
6 'step', | 6 'step', |
7 ] | 7 ] |
8 | 8 |
9 | 9 |
10 def GenSteps(api): | 10 def GenSteps(api): |
11 # We are going to have steps with the same name, so fix it automagically. | 11 # We are going to have steps with the same name, so fix it automagically. |
12 api.step.auto_resolve_conflicts = True | 12 api.step.auto_resolve_conflicts = True |
13 | 13 |
14 # The api.step object is directly callable. | 14 # The api.step object is directly callable. |
15 yield api.step('hello', ['echo', 'Hello World']) | 15 yield api.step('hello', ['echo', 'Hello World']) |
16 yield api.step('hello', ['echo', 'Why hello, there.']) | 16 yield api.step('hello', ['echo', 'Why hello, there.']) |
17 | 17 |
18 # You can also manipulate various aspects of the step, such as env. | 18 # You can also manipulate various aspects of the step, such as env. |
19 # These are passed straight through to subprocess.Popen. | 19 # These are passed straight through to subprocess.Popen. |
20 # Also, abusing bash -c in this way is a TERRIBLE IDEA DON'T DO IT. | 20 # Also, abusing bash -c in this way is a TERRIBLE IDEA DON'T DO IT. |
21 yield api.step('goodbye', ['bash', '-c', 'echo Good bye, $friend.'], | 21 yield api.step('goodbye', ['bash', '-c', 'echo Good bye, $friend.'], |
22 env={'friend': 'Darth Vader'}) | 22 env={'friend': 'Darth Vader'}) |
23 | 23 |
24 | 24 |
25 def GenTests(_api): | 25 def GenTests(api): |
26 yield 'basic', {} | 26 yield api.Test('basic') |
OLD | NEW |