提交 726c9a3b 编写于 作者: F Fam Zheng

tests: Fix ubuntu.i386 image initialization

The apt-get commands we run through ssh expect certain features of the
tty, and refuses to work if /dev/null is used. It is ugly, but easy to
satisfy.

Actually, there is no reason to hide the output. It just makes things
harder to diagnose. We can always redirect in the Makefile, so don't do
it conditionally here.
Reported-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NFam Zheng <famz@redhat.com>
Message-Id: <20180322034753.6301-1-famz@redhat.com>
Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NFam Zheng <famz@redhat.com>
上级 0c153b4c
......@@ -107,10 +107,7 @@ class BaseVM(object):
assert not isinstance(cmd, str)
ssh_cmd += ["%s@127.0.0.1" % user] + list(cmd)
logging.debug("ssh_cmd: %s", " ".join(ssh_cmd))
r = subprocess.call(ssh_cmd,
stdin=sys.stdin if interactive else self._devnull,
stdout=sys.stdout if interactive else self._stdout,
stderr=sys.stderr if interactive else self._stderr)
r = subprocess.call(ssh_cmd)
if check and r != 0:
raise Exception("SSH command failed: %s" % cmd)
return r
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册