]> code.ossystems Code Review - openembedded-core.git/commitdiff
testimage.bbclass: fix qemu_use_kvm handling
authorEmmanuel Roullit <emmanuel.roullit@gmail.com>
Wed, 5 Sep 2018 19:49:58 +0000 (21:49 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Feb 2019 22:13:03 +0000 (22:13 +0000)
QEMU_USE_KVM can either be a boolean or a whitespace separated list
of kvm supported machines.
For the 'intel-corei7-64' machine, defined in meta-intel, kvm could not be
used as the 'x86' substring is not part of its machine name.

By changing the order of this 'or' statement and setting
the 'QEMU_USE_KVM' variable to 'intel-corei7-64', it is possible to run the
'testimage' task with kvm support successfully.

(From OE-Core rev: a22789253aa653dc50fb159b40910248c2f98dd4)

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/testimage.bbclass

index 3e4ffcaca8bb16c30906193a1ad54cb5d1fad965..11c2ddab98b006b542bff5a71a58e44320ed7f80 100644 (file)
@@ -240,8 +240,8 @@ def testimage_main(d):
     # Get use_kvm
     qemu_use_kvm = d.getVar("QEMU_USE_KVM")
     if qemu_use_kvm and \
-       (oe.types.boolean(qemu_use_kvm) and 'x86' in machine or \
-        d.getVar('MACHINE') in qemu_use_kvm.split()):
+       (d.getVar('MACHINE') in qemu_use_kvm.split() or \
+        oe.types.boolean(qemu_use_kvm) and 'x86' in machine):
         kvm = True
     else:
         kvm = False