Print fully-qualified hostname to help debug issues with build1-a1 slave
TBR=cmp,navabi BUG=none Review URL: https://codereview.chromium.org/304183002 git-svn-id: http://src.chromium.org/svn/trunk/src/build@273474 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
2df2fc78fe
Коммит
fdbb84fc5c
|
@ -273,6 +273,17 @@ def RunBotCommands(options, commands, env):
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
|
proc = subprocess.Popen(
|
||||||
|
['/bin/hostname', '-f'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
hostname_stdout, hostname_stderr = proc.communicate()
|
||||||
|
if proc.returncode == 0:
|
||||||
|
print 'Running on: ' + hostname_stdout
|
||||||
|
else:
|
||||||
|
print >> sys.stderr, 'WARNING: failed to run hostname'
|
||||||
|
print >> sys.stderr, hostname_stdout
|
||||||
|
print >> sys.stderr, hostname_stderr
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
parser = GetRunBotOptParser()
|
parser = GetRunBotOptParser()
|
||||||
options, args = parser.parse_args(argv[1:])
|
options, args = parser.parse_args(argv[1:])
|
||||||
if args:
|
if args:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче