]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests.acceptance.avocado_qemu: Add support for powerpc
authorSatheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Mon, 19 Aug 2019 08:28:20 +0000 (13:58 +0530)
committerCleber Rosa <crosa@redhat.com>
Thu, 29 Aug 2019 00:42:16 +0000 (20:42 -0400)
Current acceptance test will not run properly in powerpc
environment due qemu target is different from arch, this
usually matches, except with bi-endian architectures like ppc64.
uname would return `ppc64` or `ppc64le` based `big` or `little`
endian but qemu `target` is always `ppc64`. Let's handle it.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Message-Id: <20190819082820.14817-1-sathnaga@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Cleber Rosa <crosa@redhat.com>
tests/acceptance/avocado_qemu/__init__.py

index aee5d820ed575129921eb7c3d3941b32b5e011c7..bd41e0443cb5127d68ef3d808b56e3e85aa80996 100644 (file)
@@ -39,6 +39,9 @@ def pick_default_qemu_bin(arch=None):
     """
     if arch is None:
         arch = os.uname()[4]
+    # qemu binary path does not match arch for powerpc, handle it
+    if 'ppc64le' in arch:
+        arch = 'ppc64'
     qemu_bin_relative_path = os.path.join("%s-softmmu" % arch,
                                           "qemu-system-%s" % arch)
     if is_readable_executable_file(qemu_bin_relative_path):