aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/vm/basevm.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 75af3fb..ceecc35 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -108,16 +108,14 @@ class BaseVM(object):
os.rename(fname + ".download", fname)
return fname
- def _ssh_do(self, user, cmd, check, interactive=False):
- ssh_cmd = ["ssh", "-q",
+ def _ssh_do(self, user, cmd, check):
+ ssh_cmd = ["ssh", "-q", "-t",
"-o", "StrictHostKeyChecking=no",
"-o", "UserKnownHostsFile=" + os.devnull,
"-o", "ConnectTimeout=1",
"-p", self.ssh_port, "-i", self._ssh_key_file]
for var in self.envvars:
ssh_cmd += ['-o', "SendEnv=%s" % var ]
- if interactive:
- ssh_cmd += ['-t']
assert not isinstance(cmd, str)
ssh_cmd += ["%s@127.0.0.1" % user] + list(cmd)
logging.debug("ssh_cmd: %s", " ".join(ssh_cmd))
@@ -129,9 +127,6 @@ class BaseVM(object):
def ssh(self, *cmd):
return self._ssh_do(self.GUEST_USER, cmd, False)
- def ssh_interactive(self, *cmd):
- return self._ssh_do(self.GUEST_USER, cmd, False, True)
-
def ssh_root(self, *cmd):
return self._ssh_do("root", cmd, False)
@@ -285,9 +280,9 @@ def main(vmcls):
return 2
if args.interactive:
- if vm.ssh_interactive(*cmd) == 0:
+ if vm.ssh(*cmd) == 0:
return 0
- vm.ssh_interactive()
+ vm.ssh()
return 3
else:
if vm.ssh(*cmd) != 0: