OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import collections | 7 import collections |
8 import copy | 8 import copy |
9 import json | 9 import json |
10 import os | 10 import os |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 print >> sys.stderr, hostname_stdout | 283 print >> sys.stderr, hostname_stdout |
284 print >> sys.stderr, hostname_stderr | 284 print >> sys.stderr, hostname_stderr |
285 sys.exit(1) | 285 sys.exit(1) |
286 | 286 |
287 # TODO(phajdan.jr): Remove hack for http://crbug.com/378779 . | 287 # TODO(phajdan.jr): Remove hack for http://crbug.com/378779 . |
288 if hostname_stdout == 'build1-a1.perf.chromium.org': | 288 if hostname_stdout == 'build1-a1.perf.chromium.org': |
289 if os.path.exists('/b/build/slave/Android_Builder__dbg_378779'): | 289 if os.path.exists('/b/build/slave/Android_Builder__dbg_378779'): |
290 print '/b/build/slave/Android_Builder__dbg_378779 exists, skipping' | 290 print '/b/build/slave/Android_Builder__dbg_378779 exists, skipping' |
291 else: | 291 else: |
292 print 'CLEANING UP CHECKOUT DIRECTORY HACK SEE http://crbug.com/378779' | 292 print 'CLEANING UP CHECKOUT DIRECTORY HACK SEE http://crbug.com/378779' |
293 shutil.move('/b/build/slave/Android_Builder__dbg_', | 293 os.rename('/b/build/slave/Android_Builder__dbg_', |
294 '/b/build/slave/Android_Builder__dbg_378779') | 294 '/b/build/slave/Android_Builder__dbg_378779') |
295 | 295 |
296 parser = GetRunBotOptParser() | 296 parser = GetRunBotOptParser() |
297 options, args = parser.parse_args(argv[1:]) | 297 options, args = parser.parse_args(argv[1:]) |
298 if args: | 298 if args: |
299 parser.error('Unused args: %s' % args) | 299 parser.error('Unused args: %s' % args) |
300 | 300 |
301 bot_config = GetBotConfig(options, GetBotStepMap()) | 301 bot_config = GetBotConfig(options, GetBotStepMap()) |
302 if not bot_config: | 302 if not bot_config: |
303 sys.exit(1) | 303 sys.exit(1) |
304 | 304 |
305 print 'Using config:', bot_config | 305 print 'Using config:', bot_config |
306 | 306 |
307 commands = GetCommands(options, bot_config) | 307 commands = GetCommands(options, bot_config) |
308 for command in commands: | 308 for command in commands: |
309 print 'Will run: ', bb_utils.CommandToString(command) | 309 print 'Will run: ', bb_utils.CommandToString(command) |
310 print | 310 print |
311 | 311 |
312 env = GetEnvironment(bot_config.host_obj, options.testing) | 312 env = GetEnvironment(bot_config.host_obj, options.testing) |
313 return RunBotCommands(options, commands, env) | 313 return RunBotCommands(options, commands, env) |
314 | 314 |
315 | 315 |
316 if __name__ == '__main__': | 316 if __name__ == '__main__': |
317 sys.exit(main(sys.argv)) | 317 sys.exit(main(sys.argv)) |
OLD | NEW |