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

Unified Diff: scripts/slave/recipe_modules/gclient/api.py

Issue 17635005: Make blink_trybot recipe work on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix presubmit + move polyfill (retry) Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scripts/slave/recipe_modules/gclient/__init__.py ('k') | scripts/slave/recipe_modules/gclient/config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/gclient/api.py
diff --git a/scripts/slave/recipe_modules/gclient/api.py b/scripts/slave/recipe_modules/gclient/api.py
index 280f11a7ded91ae5a0ff4b2a47bdceb806277505..508f78684a0e67a11b0b7dbff4b3fd1358c4d226 100644
--- a/scripts/slave/recipe_modules/gclient/api.py
+++ b/scripts/slave/recipe_modules/gclient/api.py
@@ -64,18 +64,18 @@ class GclientApi(recipe_api.RecipeApi):
step_name = lambda n: '[spec: %s] gclient %s' % (spec_name, n)
spec_string = jsonish_to_python(cfg.as_jsonish(), True)
- gclient = self.m.path.depot_tools('gclient', wrapper=True)
+ gclient = lambda name, *args: self.m.python(
+ name, self.m.path.depot_tools('gclient.py'), args)
- gclient_sync_extra_args = []
+ revisions = []
for s in cfg.solutions:
if s.revision is not None:
- gclient_sync_extra_args += [
- '--revision', '%s@%s' % (s.name, s.revision)]
+ revisions.extend(['--revision', '%s@%s' % (s.name, s.revision)])
if not cfg.GIT_MODE:
clean_step = self.revert(step_name)
- sync_step = self.m.step(step_name('sync'), [
- gclient, 'sync', '--nohooks'] + gclient_sync_extra_args)
+ sync_step = gclient(
+ step_name('sync'), 'sync', '--nohooks', *revisions)
else:
# clean() isn't used because the gclient sync flags passed in checkout()
# do much the same thing, and they're more correct than doing a separate
@@ -91,14 +91,12 @@ class GclientApi(recipe_api.RecipeApi):
# git-based builds (e.g. maybe some combination of 'git reset/clean -fx'
# and removing the 'out' directory).
clean_step = None
- sync_step = self.m.step(step_name('sync'), [
- gclient, 'sync', '--verbose', '--with_branch_heads', '--nohooks',
- '--reset', '--delete_unversioned_trees', '--force'])
+ sync_step = gclient(step_name('sync'),
+ 'sync', '--verbose', '--with_branch_heads', '--nohooks',
+ '--reset', '--delete_unversioned_trees', '--force', *revisions)
+
steps = [
- self.m.step(
- step_name('setup'),
- [gclient, 'config', '--spec', spec_string],
- ),
+ gclient(step_name('setup'), 'config', '--spec', spec_string)
]
if clean_step:
steps.append(clean_step)
@@ -111,9 +109,8 @@ class GclientApi(recipe_api.RecipeApi):
def revert(self, step_name_fn=lambda x: 'gclient '+x):
"""Return a gclient_safe_revert step."""
- return self.m.step(
- step_name_fn('revert'), [
- 'python',
- self.m.path.build('scripts', 'slave', 'gclient_safe_revert.py'), '.',
- self.m.path.depot_tools('gclient', wrapper=True)],
+ return self.m.python(
+ step_name_fn('revert'),
+ self.m.path.build('scripts', 'slave', 'gclient_safe_revert.py'),
+ ['.', self.m.path.depot_tools('gclient', wrapper=True)],
Isaac (away) 2013/06/29 05:34:02 I think this should be gclient.py. Recipes should
)
« no previous file with comments | « scripts/slave/recipe_modules/gclient/__init__.py ('k') | scripts/slave/recipe_modules/gclient/config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698