@@ -431,6 +431,14 @@ def ssh_command(self, command):
f'Guest command failed: {command}')
return stdout_lines, stderr_lines
+ def ssh_command_output_contains(self, cmd, exp):
+ stdout, _ = self.ssh_command(cmd)
+ for line in stdout:
+ if exp in line:
+ break
+ else:
+ self.fail('"%s" output does not contain "%s"' % (cmd, exp))
+
class LinuxDistro:
"""Represents a Linux distribution
@@ -101,14 +101,6 @@ def shutdown_via_ssh(self):
self.ssh_disconnect_vm()
wait_for_console_pattern(self, 'Power down', 'Oops')
- def ssh_command_output_contains(self, cmd, exp):
- stdout, _ = self.ssh_command(cmd)
- for line in stdout:
- if exp in line:
- break
- else:
- self.fail('"%s" output does not contain "%s"' % (cmd, exp))
-
def run_common_commands(self, wordsize):
self.ssh_command_output_contains(
'cat /proc/cpuinfo',