OLD | NEW |
---|---|
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from recipe_engine.config_types import Path | 5 from recipe_engine.config_types import Path |
6 | 6 |
7 | 7 |
8 DEPS = [ | 8 DEPS = [ |
9 'git_cl', | 9 'git_cl', |
10 'recipe_engine/path', | 10 'recipe_engine/path', |
11 'recipe_engine/raw_io', | 11 'recipe_engine/raw_io', |
12 'recipe_engine/step', | 12 'recipe_engine/step', |
13 ] | 13 ] |
14 | 14 |
15 | 15 |
16 def RunSteps(api): | 16 def RunSteps(api): |
17 res = api.git_cl.get_description(cwd=api.path.mkdtemp('fakee')) | 17 result = api.git_cl.get_description( |
18 # Look ma, no hands! (Can pass in the cwd without configuring git_cl). | 18 patch="https://code.review/123", codereview="rietveld") |
19 api.step('echo', ['echo', res.stdout]) | 19 api.git_cl.set_description( |
20 "bammmm", patch="https://code.review/123", codereview="rietveld") | |
21 api.step("echo", ["echo", result.stdout]) | |
20 | 22 |
21 api.git_cl.set_config('basic') | 23 api.git_cl.set_config("basic") |
iannucci
2016/05/12 00:25:52
I thought we liked single quotes...
martiniss
2016/05/13 19:23:56
We do! Fixed.
| |
22 api.git_cl.c.repo_location = api.path.mkdtemp('fakerepo') | 24 api.git_cl.c.repo_location = api.path.mkdtemp("fakerepo") |
23 | 25 |
24 api.step('echo', ['echo', api.git_cl.get_description().stdout]) | 26 api.step("echo", ["echo", api.git_cl.get_description().stdout]) |
25 | 27 |
26 api.git_cl.set_description("new description woo") | 28 api.git_cl.set_description("new description woo") |
27 | 29 |
28 api.step('echo', ['echo', api.git_cl.get_description().stdout]) | 30 api.step("echo", ["echo", api.git_cl.get_description().stdout]) |
29 | 31 |
30 def GenTests(api): | 32 def GenTests(api): |
31 yield ( | 33 yield ( |
32 api.test('basic') + | 34 api.test("basic") + |
33 api.override_step_data( | 35 api.override_step_data( |
34 'git_cl description', stdout=api.raw_io.output('hi')) + | 36 "git_cl description", stdout=api.raw_io.output("hi")) + |
35 api.override_step_data( | 37 api.override_step_data( |
36 'git_cl description (2)', stdout=api.raw_io.output('hey')) + | 38 "git_cl description (2)", stdout=api.raw_io.output("hey")) + |
37 api.override_step_data( | 39 api.override_step_data( |
38 'git_cl description (3)', stdout=api.raw_io.output( | 40 "git_cl description (3)", stdout=api.raw_io.output( |
39 'new description woo')) | 41 "new description woo")) |
40 ) | 42 ) |
41 | 43 |
OLD | NEW |