diff options
author | Eric Boren <borenet@google.com> | 2017-02-21 07:22:20 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-21 14:01:36 +0000 |
commit | e6b26add4da59a339b0cba10087095d58bd2db6b (patch) | |
tree | deaee426dffc45a36fb5a81e01aa3bdce1ca9177 /infra/bots/recipes/swarm_presubmit.py | |
parent | 4a2ab86d7618c4b5b31c161322ddfb4f18ab4f81 (diff) |
Roll recipe DEPS
Attempt 2. Lots of fixes due to upstream breaks.
BUG=skia:
Change-Id: Ie05b2da1790fbcce5c45ef09c4c832e09de6b5c5
Reviewed-on: https://skia-review.googlesource.com/8762
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipes/swarm_presubmit.py')
-rw-r--r-- | infra/bots/recipes/swarm_presubmit.py | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/infra/bots/recipes/swarm_presubmit.py b/infra/bots/recipes/swarm_presubmit.py index 6a3f52bfa5..940591e426 100644 --- a/infra/bots/recipes/swarm_presubmit.py +++ b/infra/bots/recipes/swarm_presubmit.py @@ -21,33 +21,27 @@ def RunSteps(api): api.vars.setup() api.core.checkout_steps() - # git-cl wants us to be on a branch. - branch = 'tmp_%s' % api.uuid.random() - api.step('create git branch', - cmd=['git', 'checkout', '-b', branch], - cwd=api.vars.skia_dir) - try: - api.step('git status', - cmd=['git', 'status'], - cwd=api.vars.skia_dir) - - depot_tools_path = api.depot_tools.package_repo_resource() - env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])} - api.step('presubmit', - cmd=['git', 'cl', 'presubmit', '--force', '-v', '-v'], - cwd=api.vars.skia_dir, - env=env) - finally: - api.step('git reset', - cmd=['git', 'reset', '--hard', 'origin/master'], - cwd=api.vars.skia_dir) - api.step('checkout origin/master', - cmd=['git', 'checkout', 'origin/master'], - cwd=api.vars.skia_dir) - api.step('delete git branch', - cmd=['git', 'branch', '-D', branch], - cwd=api.vars.skia_dir) - + with api.step.context({'cwd': api.vars.skia_dir}): + # git-cl wants us to be on a branch. + branch = 'tmp_%s' % api.uuid.random() + api.step('create git branch', + cmd=['git', 'checkout', '-b', branch]) + try: + api.step('git status', + cmd=['git', 'status']) + + depot_tools_path = api.depot_tools.package_repo_resource() + env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])} + api.step('presubmit', + cmd=['git', 'cl', 'presubmit', '--force', '-v', '-v'], + env=env) + finally: + api.step('git reset', + cmd=['git', 'reset', '--hard', 'origin/master']) + api.step('checkout origin/master', + cmd=['git', 'checkout', 'origin/master']) + api.step('delete git branch', + cmd=['git', 'branch', '-D', branch]) def GenTests(api): |