[oe-commits] [openembedded-core] 08/08: oeqa: QEMU_USE_KVM can list machines
git at git.openembedded.org
git at git.openembedded.org
Tue Mar 28 07:43:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit d5421dd00b9cf785fa77e77c6c739e8bd8822fa3
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Mon Mar 27 15:03:23 2017 +0200
oeqa: QEMU_USE_KVM can list machines
Previously, QEMU_USE_KVM=True enabled the use of kvm only when "x86"
was in the MACHINE name. That is too limiting, because for example
intel-corei7-64 can also use kvm but it wasn't possible to enable that
without changing OE-core.
That traditional usage is still supported. In addition, QEMU_USE_KVM
can be set to a list of space-separated MACHINE names for which kvm is
to be enabled.
Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/testimage.bbclass | 4 +++-
meta/lib/oeqa/targetcontrol.py | 7 ++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index bfe5714..a259423 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -210,7 +210,9 @@ 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:
+ if qemu_use_kvm and \
+ (qemu_use_kvm == 'True' and 'x86' in machine or \
+ d.getVar('MACHINE') in qemu_use_kvm.split()):
kvm = True
else:
kvm = False
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 40a2589..c3aeb22 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -131,9 +131,10 @@ class QemuTarget(BaseTarget):
dump_target_cmds = d.getVar("testimage_dump_target")
dump_host_cmds = d.getVar("testimage_dump_host")
dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
- if d.getVar("QEMU_USE_KVM", False) is not None \
- and d.getVar("QEMU_USE_KVM", False) == "True" \
- and "x86" in d.getVar("MACHINE"):
+ qemu_use_kvm = d.getVar("QEMU_USE_KVM")
+ if qemu_use_kvm and \
+ (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
+ d.getVar("MACHINE") in qemu_use_kvm.split()):
use_kvm = True
else:
use_kvm = False
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list