aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/targetcontrol.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-11-14 02:19:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-18 18:00:22 +0000
commitf28890ae2eb8a9cb2da39588e696a4b0c501bdf0 (patch)
tree47a82261b4470f7fde6aef735fde3a7eb41c5e0d /meta/lib/oeqa/targetcontrol.py
parent79f36e7d329a8aa2ed1b1d69878203ced96bc6ca (diff)
downloadopenembedded-core-contrib-f28890ae2eb8a9cb2da39588e696a4b0c501bdf0.tar.gz
openembedded-core-contrib-f28890ae2eb8a9cb2da39588e696a4b0c501bdf0.tar.bz2
openembedded-core-contrib-f28890ae2eb8a9cb2da39588e696a4b0c501bdf0.zip
targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
So that both QEMU_USE_KVM = "True" and "1" will work. [YOCTO #12343] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r--meta/lib/oeqa/targetcontrol.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index f63936c3ec..59a9c35a09 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: