summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2019-01-04 15:15:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 17:23:07 +0000
commit564de3681353fe8e203425388e8be9703a89d2da (patch)
tree261db1fb7298942bc08ce61b3b73a90ca4eb274e
parent37e5035a2ba27595eeef22062580a5b04a73ba15 (diff)
downloadopenembedded-core-contrib-564de3681353fe8e203425388e8be9703a89d2da.tar.gz
openembedded-core-contrib-564de3681353fe8e203425388e8be9703a89d2da.tar.bz2
openembedded-core-contrib-564de3681353fe8e203425388e8be9703a89d2da.zip
oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is set
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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"