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

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

Issue 2245113002: Track step nesting in StreamEngine. (Closed) Base URL: https://github.com/luci/recipes-py@emit-initial-properties
Patch Set: Rebase, comments. Created 4 years, 3 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
OLDNEW
1 # Copyright 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 from recipe_engine.recipe_api import Property 5 from recipe_engine.recipe_api import Property
6 6
7 DEPS = [ 7 DEPS = [
8 'generator_script', 8 'generator_script',
9 'json', 9 'json',
10 'path', 10 'path',
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 {'name': 'runs', 'cmd': ['echo', 'runs succeeds']}, 66 {'name': 'runs', 'cmd': ['echo', 'runs succeeds']},
67 {'name': 'fails', 'cmd': ['echo', 'fails fails!']}, 67 {'name': 'fails', 'cmd': ['echo', 'fails fails!']},
68 {'name': 'skipped', 'cmd': ['echo', 'absent']}, 68 {'name': 'skipped', 'cmd': ['echo', 'absent']},
69 {'name': 'always_runs', 'cmd': ['echo', 'runs anyway'], 69 {'name': 'always_runs', 'cmd': ['echo', 'runs anyway'],
70 'always_run': True}, 70 'always_run': True},
71 ) + 71 ) +
72 api.step_data('fails', retcode=1) 72 api.step_data('fails', retcode=1)
73 ) 73 )
74 74
75 yield ( 75 yield (
76 api.test('nested') +
77 api.properties(script_name='nested.py') +
78 api.generator_script(
79 'nested.py',
80 {'name': 'grandparent', 'cmd': ['echo', 'grandparent']},
81 {'name': 'parent', 'step_nest_level': 1, 'cmd': ['echo', 'parent']},
82 {'name': 'child', 'step_nest_level': 2, 'cmd': ['echo', 'child']},
83 {'name': 'sibling', 'step_nest_level': 2, 'cmd': ['echo', 'sibling']},
84 {'name': 'uncle', 'step_nest_level': 1, 'cmd': ['echo', 'uncle']},
85 {'name': 'cousin', 'step_nest_level': 2, 'cmd': ['echo', 'cousin']},
86 )
87 )
88
89 yield (
76 api.test('malformed_command') + 90 api.test('malformed_command') +
77 api.properties(script_name='malformed.py') + 91 api.properties(script_name='malformed.py') +
78 api.generator_script( 92 api.generator_script(
79 'malformed.py', 93 'malformed.py',
80 {'name': 'run', 'cmd': ['echo', 'there are', 4, 'cows']}) + 94 {'name': 'run', 'cmd': ['echo', 'there are', 4, 'cows']}) +
81 api.expect_exception('AssertionError') 95 api.expect_exception('AssertionError')
82 ) 96 )
OLDNEW
« no previous file with comments | « recipe_modules/generator_script/api.py ('k') | recipe_modules/generator_script/example.expected/nested.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698