Message ID | 20200302181907.32110-3-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | testing/next updates (tweaks and re-greening) | expand |
On 3/2/20 7:18 PM, Alex Bennée wrote: > From: Robert Foley <robert.foley@linaro.org> > > Add changes to tests/vm/basevm.py so that during debug mode we show ssh output. > > Signed-off-by: Robert Foley <robert.foley@linaro.org> > Reviewed-by: Peter Puhov <peter.puhov@linaro.org> > Reviewed-by: Alex Bennée <alex.bennee@linaro.org> > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > Message-Id: <20200219163537.22098-3-robert.foley@linaro.org> > --- > tests/vm/basevm.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py > index 4dee6647e6e..c99725b8c0d 100644 > --- a/tests/vm/basevm.py > +++ b/tests/vm/basevm.py > @@ -120,11 +120,16 @@ class BaseVM(object): > return fname > > def _ssh_do(self, user, cmd, check): > - ssh_cmd = ["ssh", "-q", "-t", > + ssh_cmd = ["ssh", > + "-t", > "-o", "StrictHostKeyChecking=no", > "-o", "UserKnownHostsFile=" + os.devnull, > "-o", "ConnectTimeout=1", > "-p", self.ssh_port, "-i", self._ssh_key_file] > + # If not in debug mode, set ssh to quiet mode to > + # avoid printing the results of commands. > + if not self.debug: > + ssh_cmd.append("-q") > for var in self.envvars: > ssh_cmd += ['-o', "SendEnv=%s" % var ] > assert not isinstance(cmd, str) > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 4dee6647e6e..c99725b8c0d 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -120,11 +120,16 @@ class BaseVM(object): return fname def _ssh_do(self, user, cmd, check): - ssh_cmd = ["ssh", "-q", "-t", + ssh_cmd = ["ssh", + "-t", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout=1", "-p", self.ssh_port, "-i", self._ssh_key_file] + # If not in debug mode, set ssh to quiet mode to + # avoid printing the results of commands. + if not self.debug: + ssh_cmd.append("-q") for var in self.envvars: ssh_cmd += ['-o', "SendEnv=%s" % var ] assert not isinstance(cmd, str)