aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-11-14 02:19:22 +0800
committerRobert Yang <liezhi.yang@windriver.com>2017-12-06 18:01:41 +0800
commitd5f8f668e65a00130af46e14bc7558523315ce71 (patch)
tree64cd68e81b4e2c123e50de4abd9387ea9cef969a
parenta7cd9d1183be603777fc9c8c448281fe01224f7b (diff)
downloadopenembedded-core-contrib-rbt/use_qemu.zip
openembedded-core-contrib-rbt/use_qemu.tar.gz
openembedded-core-contrib-rbt/use_qemu.tar.bz2
targetcontrol.py: use oe.types.boolean for QEMU_USE_KVMrbt/use_qemu
So that both QEMU_USE_KVM = "True" and "1" will work. [YOCTO #12343] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/classes/testimage.bbclass2
-rw-r--r--meta/lib/oeqa/targetcontrol.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 45bb2bd..7260ad4 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -215,7 +215,7 @@ def testimage_main(d):
# Get use_kvm
qemu_use_kvm = d.getVar("QEMU_USE_KVM")
if qemu_use_kvm and \
- (qemu_use_kvm == 'True' and 'x86' in machine or \
+ (oe.types.boolean(qemu_use_kvm) and 'x86' in machine or \
d.getVar('MACHINE') in qemu_use_kvm.split()):
kvm = True
else:
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index f63936c..59a9c35 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -91,6 +91,8 @@ class QemuTarget(BaseTarget):
def __init__(self, d, logger, image_fstype=None):
+ import oe.types
+
super(QemuTarget, self).__init__(d, logger)
self.rootfs = ''
@@ -107,7 +109,7 @@ class QemuTarget(BaseTarget):
dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
qemu_use_kvm = d.getVar("QEMU_USE_KVM")
if qemu_use_kvm and \
- (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
+ (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: