Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: scripts/slave/recipe_modules/generator_script/example.py

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: License headers Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 'generator_script', 6 'generator_script',
7 'path' 7 'path'
8 ] 8 ]
9 9
10 10
11 def GenSteps(api): 11 def GenSteps(api):
12 api.path.add_checkout(api.path.slave_build()) 12 api.path.add_checkout(api.path.slave_build())
13 yield api.generator_script('bogus') 13 yield api.generator_script('bogus')
14 yield api.generator_script('bogus.py') 14 yield api.generator_script('bogus.py')
15 15
16 16
17 def GenTests(_api): 17 def GenTests(api):
18 yield 'basic', { 18 yield (
19 'step_mocks': { 19 api.test('basic') +
20 'gen step(bogus)': { 20 api.generator_script(
21 'json': { 21 'bogus',
22 'output': [{'name': 'mock.step.binary', 22 {'name': 'mock.step.binary', 'cmd': ['echo', 'mock step binary']}
23 'cmd': ['echo', 'mock step binary']}] 23 ) +
24 } 24 api.generator_script(
25 }, 25 'bogus.py',
26 'gen step(bogus.py)': { 26 {'name': 'mock.step.python', 'cmd': ['echo', 'mock step python']}
27 'json': { 27 )
28 'output': [{'name': 'mock.step.python', 28 )
29 'cmd': ['echo', 'mock step python']}]
30 }
31 }
32 }
33 }
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/generator_script/api.py ('k') | scripts/slave/recipe_modules/generator_script/test_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698