add `get_machine_types()` to return list of supported machine types by the qemu binary.
Signed-off-by: Balamuruhan S <bal...@linux.ibm.com> --- tests/acceptance/avocado_qemu/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index aee5d820ed..df18561e97 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -82,6 +82,12 @@ class Test(avocado.Test): self._vms[name] = self._new_vm(*args) return self._vms[name] + def get_machine_types(self): + cmd = "%s -machine ?" % self.qemu_bin + output = avocado.utils.process.getoutput(cmd).split("\n") + output.remove("Supported machines are:") + return [each.split()[0] for each in output] + def tearDown(self): for vm in self._vms.values(): vm.shutdown() -- 2.14.5