aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-01-03 15:27:56 +0800
committerRobert Yang <liezhi.yang@windriver.com>2019-01-04 15:09:28 +0800
commit2b5e15052a2439ba1266f467879a2a8ac25c2563 (patch)
tree800ce70bed127bd8539a04018b0f4b19e64a7b34
parent27ff0a7a72fb16f8abb9cc384f9bf5733d399680 (diff)
downloadopenembedded-core-contrib-rbt/kvm.tar.gz
openembedded-core-contrib-rbt/kvm.tar.bz2
openembedded-core-contrib-rbt/kvm.zip
oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is setrbt/kvm
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/lib/oeqa/selftest/cases/runqemu.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index 4e35bb97e3..f69d4706a5 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -5,6 +5,7 @@
import re
import tempfile
import time
+import oe.types
from oeqa.selftest.case import OESelftestTestCase
from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd
from oeqa.core.decorator.oeid import OETestID
@@ -22,6 +23,10 @@ class RunqemuTests(OESelftestTestCase):
self.fstypes = "ext4 iso hddimg wic.vmdk wic.qcow2 wic.vdi"
self.cmd_common = "runqemu nographic"
+ kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), 'x86_64')
+ if kvm:
+ self.cmd_common += " kvm"
+
self.write_config(
"""
MACHINE = "%s"