Skip to contentSkip to conversation

testimage.bbclass: fix qemu_use_kvm handling

PATCH New Emmanuel Roullit 1 participant 1 message Sep 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testimage.bbclass: fix qemu_use_kvm handling

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.

---
 meta/classes/testimage.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/testimage.bbclass +2 -2
index 6fa901b..39de191 100644
@@ -221,8 +221,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
Signature · 1 line
2.7.4