| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 | 6 |
| 7 """Update the buildbot checkouts for each buildslave on every host. | 7 """Update the buildbot checkouts for each buildslave on every host. |
| 8 | 8 |
| 9 This differs from UpdateScripts in that it updates ALL of the buildbot script | 9 This differs from UpdateScripts in that it updates ALL of the buildbot script |
| 10 checkouts for ALL buildslaves, as opposed to a single buildslave's checkout of | 10 checkouts for ALL buildslaves, as opposed to a single buildslave's checkout of |
| 11 the buildbot scripts on a single host machine. | 11 the buildbot scripts on a single host machine. |
| 12 """ | 12 """ |
| 13 | 13 |
| 14 | 14 |
| 15 import re | 15 import re |
| 16 import skia_vars | 16 import skia_vars |
| 17 import sys | 17 import sys |
| 18 | 18 |
| 19 from build_step import BuildStep, BuildStepWarning | 19 from build_step import BuildStep, BuildStepWarning |
| 20 from scripts import run_cmd |
| 20 from utils import force_update_checkout | 21 from utils import force_update_checkout |
| 21 from utils import misc | |
| 22 | |
| 23 sys.path.append(misc.BUILDBOT_PATH) | |
| 24 | |
| 25 from scripts import run_cmd | |
| 26 | 22 |
| 27 | 23 |
| 28 BUILDBOT_GIT_URL = skia_vars.GetGlobalVariable('buildbot_git_url') | 24 BUILDBOT_GIT_URL = skia_vars.GetGlobalVariable('buildbot_git_url') |
| 29 | 25 |
| 30 | 26 |
| 31 class UpdateAllBuildslaves(BuildStep): | 27 class UpdateAllBuildslaves(BuildStep): |
| 32 def _Run(self): | 28 def _Run(self): |
| 33 script_path = run_cmd.ResolvablePath('slave', 'skia_slave_scripts', 'utils', | 29 script_path = run_cmd.ResolvablePath('slave', 'skia_slave_scripts', 'utils', |
| 34 'force_update_checkout.py') | 30 'force_update_checkout.py') |
| 35 sync_cmd = ['python', script_path] | 31 sync_cmd = ['python', script_path] |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 print ' ', failed_host | 74 print ' ', failed_host |
| 79 | 75 |
| 80 if failed: | 76 if failed: |
| 81 # TODO(borenet): Make sure that we can log in to all hosts, then make this | 77 # TODO(borenet): Make sure that we can log in to all hosts, then make this |
| 82 # an error. | 78 # an error. |
| 83 raise BuildStepWarning('Could not update some buildslaves.') | 79 raise BuildStepWarning('Could not update some buildslaves.') |
| 84 | 80 |
| 85 | 81 |
| 86 if '__main__' == __name__: | 82 if '__main__' == __name__: |
| 87 sys.exit(BuildStep.RunBuildStep(UpdateAllBuildslaves)) | 83 sys.exit(BuildStep.RunBuildStep(UpdateAllBuildslaves)) |
| OLD | NEW |