]> Git Repo - qemu.git/commitdiff
tests/vm: Debug mode shows ssh output.
authorRobert Foley <[email protected]>
Tue, 3 Mar 2020 15:06:15 +0000 (15:06 +0000)
committerAlex Bennée <[email protected]>
Wed, 4 Mar 2020 09:57:23 +0000 (09:57 +0000)
Add changes to tests/vm/basevm.py so that during debug mode we show ssh output.

Signed-off-by: Robert Foley <[email protected]>
Reviewed-by: Peter Puhov <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <20200219163537[email protected]>
Message-Id: <20200303150622[email protected]>

tests/vm/basevm.py

index 4dee6647e6e67f77a7d7f9de5b70fe414be2ba0f..c99725b8c0d756c29ab7a6510ed680d48d0413df 100644 (file)
@@ -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)
This page took 0.028064 seconds and 4 git commands to generate.