[OE-core] [PATCH 1/1] targetcontrol.py: make QEMU_USE_KVM = "1" work
Robert Yang
liezhi.yang at windriver.com
Tue Nov 14 06:57:36 UTC 2017
It only could be set to "True", which was not common in oe, e.g.:
* Works
QEMU_USE_KVM = "True"
* Didn't work, this would surprise user.
QEMU_USE_KVM = "1"
Make it work with both 1 and True now, the "True" is for compatibility.
[YOCTO #12343]
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
meta/classes/testimage.bbclass | 2 +-
meta/lib/oeqa/targetcontrol.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 45bb2bd..66b4baf 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 \
+ (qemu_use_kvm in ('True', '1') 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..1625569 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -107,7 +107,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 \
+ (qemu_use_kvm in ("True", "1") and "x86" in d.getVar("MACHINE") or \
d.getVar("MACHINE") in qemu_use_kvm.split()):
use_kvm = True
else:
--
2.7.4
More information about the Openembedded-core
mailing list