[oe-commits] [openembedded-core] 09/10: oeqa: drop support of listing machines in QEMU_USE_KVM

git at git.openembedded.org git at git.openembedded.org
Wed Dec 5 13:38:52 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit e13d781e5291b83d2d6ca76be23896751457e10c
Author: Chen Qi <Qi.Chen at windriver.com>
AuthorDate: Wed Dec 5 17:34:27 2018 +0800

    oeqa: drop support of listing machines in QEMU_USE_KVM
    
    We want QEMU_USE_KVM to only set to some boolean value, with possible
    MACHINE override. Drop the support of listing machines in this variable,
    and give users error message if they still do so.
    
    Error message below is an example.
    
    ERROR: core-image-minimal-1.0-r0 do_testimage: Invalid boolean value 'intel-corei7-64 intel-core2-32 qemux86 qemux86-64'
    QEMU_USE_KVM needs to be set to a boolean value. It no longer supports accepting a list of machines.
      e.g.
        QEMU_USE_KVM_qemux86-64 = '1'
        ERROR: core-image-minimal-1.0-r0 do_testimage: Function failed: do_testimage
    
    Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/classes/testimage.bbclass | 12 ++++++------
 meta/lib/oeqa/targetcontrol.py | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 82cbb06..7c3bc0a 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -229,12 +229,12 @@ def testimage_main(d):
 
     # Get use_kvm
     qemu_use_kvm = d.getVar("QEMU_USE_KVM")
-    if qemu_use_kvm and \
-       (d.getVar('MACHINE') in qemu_use_kvm.split() or \
-        oe.types.boolean(qemu_use_kvm) and 'x86' in machine):
-        kvm = True
-    else:
-        kvm = False
+    try:
+        kvm = oe.types.boolean(qemu_use_kvm)
+    except ValueError as e:
+        bb.fatal("%s\nQEMU_USE_KVM needs to be set to a boolean value. It no longer supports accepting a list of machines.\n"
+                 "  e.g.\n"
+                 "  QEMU_USE_KVM_qemux86-64 = '1'" % e)
 
     slirp = False
     if d.getVar("QEMU_USE_SLIRP"):
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 59a9c35..158a8b0 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -108,12 +108,12 @@ class QemuTarget(BaseTarget):
         dump_host_cmds = d.getVar("testimage_dump_host")
         dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
         qemu_use_kvm = d.getVar("QEMU_USE_KVM")
-        if qemu_use_kvm and \
-           (oe.types.boolean(qemu_use_kvm) and "x86" in d.getVar("MACHINE") or \
-            d.getVar("MACHINE") in qemu_use_kvm.split()):
-            use_kvm = True
-        else:
-            use_kvm = False
+        try:
+            use_kvm = oe.types.boolean(qemu_use_kvm)
+        except ValueError as e:
+            bb.fatal("%s\nQEMU_USE_KVM needs to be set to a boolean value. It no longer supports accepting a list of machines.\n"
+                     "  e.g.\n"
+                     "  QEMU_USE_KVM_qemux86-64 = '1'" % e)
 
         # Log QemuRunner log output to a file
         import oe.path

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list