OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """A small maintenance tool to do mass execution on the slaves.""" | 6 """A small maintenance tool to do mass execution on the slaves.""" |
7 | 7 |
8 import os | 8 import os |
9 import optparse | 9 import optparse |
10 import re | 10 import re |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 if not retcode: | 88 if not retcode: |
89 retcode = SubRun(options.mac, options.mac_names, cmd, options) | 89 retcode = SubRun(options.mac, options.mac_names, cmd, options) |
90 return retcode | 90 return retcode |
91 | 91 |
92 | 92 |
93 def Clobber(options): | 93 def Clobber(options): |
94 options.no_cygwin = False | 94 options.no_cygwin = False |
95 path_dbg = '/cygdrive/e/b/build/slave/*/build/src/*/Debug' | 95 path_dbg = '/cygdrive/e/b/build/slave/*/build/src/*/Debug' |
96 path_rel = '/cygdrive/e/b/build/slave/*/build/src/*/Release' | 96 path_rel = '/cygdrive/e/b/build/slave/*/build/src/*/Release' |
97 options.win_cmd = 'rm -rf %s %s' % (path_dbg, path_rel) | 97 options.win_cmd = 'rm -rf %s %s' % (path_dbg, path_rel) |
98 path_scons = '/b/build/slave/*/build/src/sconsbuild' | |
99 path_make = '/b/build/slave/*/build/src/out' | 98 path_make = '/b/build/slave/*/build/src/out' |
100 options.linux_cmd = 'rm -rf %s %s' % (path_scons, path_make) | 99 options.linux_cmd = 'rm -rf %s' % path_make |
101 path = '/b/build/slave/*/build/src/xcodebuild' | 100 path = '/b/build/slave/*/build/src/xcodebuild' |
102 options.mac_cmd = 'rm -rf %s' % path | 101 options.mac_cmd = 'rm -rf %s' % path |
103 # We don't want to stop if one slave failed. | 102 # We don't want to stop if one slave failed. |
104 options.ignore_failure = True | 103 options.ignore_failure = True |
105 return RunSSH(options) | 104 return RunSSH(options) |
106 | 105 |
107 | 106 |
108 def Revert(options): | 107 def Revert(options): |
109 options.no_cygwin = False | 108 options.no_cygwin = False |
110 path = '/cygdrive/e/b/build/slave/*/build/src' | 109 path = '/cygdrive/e/b/build/slave/*/build/src' |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 else: | 324 else: |
326 if ((options.win and not options.win_cmd) or | 325 if ((options.win and not options.win_cmd) or |
327 (options.linux and not options.linux_cmd) or | 326 (options.linux and not options.linux_cmd) or |
328 (options.mac and not options.mac_cmd)): | 327 (options.mac and not options.mac_cmd)): |
329 parser.error('Need to specify a command') | 328 parser.error('Need to specify a command') |
330 return RunSSH(options) | 329 return RunSSH(options) |
331 | 330 |
332 | 331 |
333 if __name__ == '__main__': | 332 if __name__ == '__main__': |
334 sys.exit(Main(None)) | 333 sys.exit(Main(None)) |
OLD | NEW |