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

Side by Side Diff: scripts/slave/recipe_modules/step/config.py

Issue 966993002: api.trigger: refactoring, made extensible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 9 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 import collections 5 import collections
6 6
7 from slave.recipe_config import List 7 from slave.recipe_config import List
8 from slave.recipe_config import (config_item_context, ConfigGroup, ConfigList, 8 from slave.recipe_config import (config_item_context, ConfigGroup, ConfigList,
9 Dict, Single, Set) 9 Dict, Single, Set)
10 from slave.recipe_config_types import Path 10 from slave.recipe_config_types import Path
(...skipping 17 matching lines...) Expand all
28 cwd = Single(Path, jsonish_fn=str, required=False), 28 cwd = Single(Path, jsonish_fn=str, required=False),
29 29
30 stdout = Single(Placeholder, required=False), 30 stdout = Single(Placeholder, required=False),
31 stderr = Single(Placeholder, required=False), 31 stderr = Single(Placeholder, required=False),
32 stdin = Single(Placeholder, required=False), 32 stdin = Single(Placeholder, required=False),
33 33
34 allow_subannotations = Single(bool, required=False), 34 allow_subannotations = Single(bool, required=False),
35 35
36 trigger_specs = ConfigList( 36 trigger_specs = ConfigList(
37 lambda: ConfigGroup( 37 lambda: ConfigGroup(
38 builder_name=Single(basestring),
38 properties=Dict(value_type=object), 39 properties=Dict(value_type=object),
40 buildbot_changes=List(dict),
39 ), 41 ),
40 ), 42 ),
41 43
42 step_test_data = Single(collections.Callable, required=False), 44 step_test_data = Single(collections.Callable, required=False),
43 45
44 ok_ret = Set(int), 46 ok_ret = Set(int),
45 infra_step = Single(bool, required=False) 47 infra_step = Single(bool, required=False)
46 ) 48 )
47 49
48 50
49 config_ctx = config_item_context(BaseConfig, {'_DUMMY': ['val']}, 'example') 51 config_ctx = config_item_context(BaseConfig, {'_DUMMY': ['val']}, 'example')
50 52
51 @config_ctx() 53 @config_ctx()
52 def test(c): # pragma: no cover 54 def test(c): # pragma: no cover
53 c.name = 'test' 55 c.name = 'test'
54 c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')] 56 c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698