OLD | NEW |
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 Loading... |
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 ( | |
90 api.test('malformed_command') + | 76 api.test('malformed_command') + |
91 api.properties(script_name='malformed.py') + | 77 api.properties(script_name='malformed.py') + |
92 api.generator_script( | 78 api.generator_script( |
93 'malformed.py', | 79 'malformed.py', |
94 {'name': 'run', 'cmd': ['echo', 'there are', 4, 'cows']}) + | 80 {'name': 'run', 'cmd': ['echo', 'there are', 4, 'cows']}) + |
95 api.expect_exception('AssertionError') | 81 api.expect_exception('AssertionError') |
96 ) | 82 ) |
OLD | NEW |