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

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

Issue 1115453002: Recipes: make cwd default to slave_build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 5 years, 7 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 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
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)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/step/__init__.py ('k') | scripts/slave/recipe_modules/step/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698