OLD | NEW |
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 from slave import recipe_api | 5 from slave import recipe_api |
6 from slave import recipe_util | 6 from slave import recipe_util |
7 | 7 |
8 | 8 |
9 # Inherit from RecipeApiPlain because the only thing which is a step is | 9 # Inherit from RecipeApiPlain because the only thing which is a step is |
10 # run_from_dict() | 10 # run_from_dict() |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 if step_count > 1: | 107 if step_count > 1: |
108 name = "%s (%d)" % (name, step_count) | 108 name = "%s (%d)" % (name, step_count) |
109 | 109 |
110 kwargs['ok_ret'] = ok_ret | 110 kwargs['ok_ret'] = ok_ret |
111 kwargs['infra_step'] = bool(infra_step) | 111 kwargs['infra_step'] = bool(infra_step) |
112 | 112 |
113 # Obtain information from composite step parent. | 113 # Obtain information from composite step parent. |
114 kwargs['name'] = compositor.get_with_context('name', name) | 114 kwargs['name'] = compositor.get_with_context('name', name) |
115 kwargs['env'] = compositor.get_with_context('env', kwargs.get('env', {})) | 115 kwargs['env'] = compositor.get_with_context('env', kwargs.get('env', {})) |
116 | 116 |
| 117 kwargs.setdefault('cwd', self.m.path['slave_build']) |
| 118 |
117 schema = self.make_config() | 119 schema = self.make_config() |
118 schema.set_val(kwargs) | 120 schema.set_val(kwargs) |
119 return self.run_from_dict(self._engine.create_step(schema)) | 121 return self.run_from_dict(self._engine.create_step(schema)) |
120 | 122 |
121 # TODO(martiniss) delete, and make generator_script use **kwargs on step() | 123 # TODO(martiniss) delete, and make generator_script use **kwargs on step() |
122 @recipe_api.composite_step | 124 @recipe_api.composite_step |
123 def run_from_dict(self, dct): | 125 def run_from_dict(self, dct): |
124 return self._engine.run_step(dct) | 126 return self._engine.run_step(dct) |
OLD | NEW |