Index: scripts/slave/recipes/infra/git_cl.py |
diff --git a/scripts/slave/recipes/infra/git_cl.py b/scripts/slave/recipes/infra/git_cl.py |
index 582f1d8a6888af2802d7803498a0fbd7d151602b..72e8342e38590ff2f5f0ba174f05d285dc25516c 100644 |
--- a/scripts/slave/recipes/infra/git_cl.py |
+++ b/scripts/slave/recipes/infra/git_cl.py |
@@ -31,47 +31,10 @@ def RunSteps(api): |
# Make sure our checkout of depot_tools is used. |
env = {'PATH': api.path.pathsep.join([str(api.path['checkout']), '%(PATH)s'])} |
- |
- repo = api.path['slave_build'].join('test_repo') |
- repo_hooks = repo.join('.git', 'hooks') |
- |
- # api.file.rmtree('remove repo', repo) |
- api.python.inline('remove repo workaround for http://crbug.com/589201', |
- """ |
- import shutil, sys, os |
- shutil.rmtree(sys.argv[1], ignore_errors=True) |
- """, args=[str(repo)]) |
- |
- api.git.checkout( |
- url='https://chromium.googlesource.com/playground/gerrit-cq/normal', |
- ref='master', |
- dir_path=repo) |
- |
- git = run_git(api, repo, env) |
- git('cl', '--version', name='version') |
- git('config', '--local', |
- 'user.email', '182615506979@project.gserviceaccount.com') |
- git('config', '--local', 'user.name', 'chrome-bot on gce') |
- git('branch', '-D', 'feature', |
- ok_ret='any', name='delete old feature branch') |
- api.file.remove('remove hooks', repo_hooks.join('commit-msg'), ok_ret='any') |
- git('new-branch', 'feature') |
- api.file.write('hack hack', repo.join('patchset.data'), |
- '%s-%s-%s' % (api.properties['mastername'], |
- api.properties['buildername'], |
- api.properties['buildnumber'])) |
- git('add', 'patchset.data') |
- git('commit', '-m', 'Normal message.') |
- git('cl', 'upload', '--squash', '-f', name='git cl upload') |
- try: |
- for a in api.file.listdir('check hooks', repo.join('.git', 'hooks')): |
- if a == 'commit-msg': |
- api.step.active_result.presentation.status = api.step.FAILURE |
- raise api.step.StepFailure('commit-msg hook got installed') |
- finally: |
- # Gerrit equivalent is Abandon. |
- git('cl', 'set-close', name='git cl set-close') |
- |
+ git = run_git(api, api.path['checkout'], env) |
+ git('commit', '-a', '-m', 'whatever') |
+ git('cl', 'issue', '1718153002') |
+ git('cl', 'try-results', '-p', '60001') |
def GenTests(api): |
yield ( |