Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: build/android/buildbot/bb_run_bot.py

Issue 304183002: Print fully-qualified hostname to help debug issues with build1-a1 slave (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 print bb_utils.CommandToString(command) 266 print bb_utils.CommandToString(command)
267 sys.stdout.flush() 267 sys.stdout.flush()
268 if options.testing: 268 if options.testing:
269 env['BUILDBOT_TESTING'] = '1' 269 env['BUILDBOT_TESTING'] = '1'
270 return_code = subprocess.call(command, cwd=bb_utils.CHROME_SRC, env=env) 270 return_code = subprocess.call(command, cwd=bb_utils.CHROME_SRC, env=env)
271 if return_code != 0: 271 if return_code != 0:
272 return return_code 272 return return_code
273 273
274 274
275 def main(argv): 275 def main(argv):
276 proc = subprocess.Popen(
277 ['/bin/hostname', '-f'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
278 hostname_stdout, hostname_stderr = proc.communicate()
279 if proc.returncode == 0:
280 print 'Running on: ' + hostname_stdout
281 else:
282 print >> sys.stderr, 'WARNING: failed to run hostname'
283 print >> sys.stderr, hostname_stdout
284 print >> sys.stderr, hostname_stderr
285 sys.exit(1)
286
276 parser = GetRunBotOptParser() 287 parser = GetRunBotOptParser()
277 options, args = parser.parse_args(argv[1:]) 288 options, args = parser.parse_args(argv[1:])
278 if args: 289 if args:
279 parser.error('Unused args: %s' % args) 290 parser.error('Unused args: %s' % args)
280 291
281 bot_config = GetBotConfig(options, GetBotStepMap()) 292 bot_config = GetBotConfig(options, GetBotStepMap())
282 if not bot_config: 293 if not bot_config:
283 sys.exit(1) 294 sys.exit(1)
284 295
285 print 'Using config:', bot_config 296 print 'Using config:', bot_config
286 297
287 commands = GetCommands(options, bot_config) 298 commands = GetCommands(options, bot_config)
288 for command in commands: 299 for command in commands:
289 print 'Will run: ', bb_utils.CommandToString(command) 300 print 'Will run: ', bb_utils.CommandToString(command)
290 print 301 print
291 302
292 env = GetEnvironment(bot_config.host_obj, options.testing) 303 env = GetEnvironment(bot_config.host_obj, options.testing)
293 return RunBotCommands(options, commands, env) 304 return RunBotCommands(options, commands, env)
294 305
295 306
296 if __name__ == '__main__': 307 if __name__ == '__main__':
297 sys.exit(main(sys.argv)) 308 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698