tests.acceptance.avocado_qemu: Add support for powerpc

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>
master
Satheesh Rajendran 2019-08-19 13:58:20 +05:30 committed by Cleber Rosa
parent 23919ddfd5
commit 9162967ca5
1 changed files with 3 additions and 0 deletions

View 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):