[2/2] oeqa/selftest/runqemu: enable kvm when QEMU_USE_KVM is set

Submitted by Robert Yang on Jan. 3, 2019, 8:05 a.m. | Patch ID: 157531

Details

Message ID 3724890350f65ec18b5906ce28dfdcedc61b1381.1546502650.git.liezhi.yang@windriver.com
State New
Headers show

Commit Message

Robert Yang Jan. 3, 2019, 8:05 a.m.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/lib/oeqa/selftest/cases/runqemu.py | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py
index 4e35bb9..0b664b4 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'), self.machine)
+        if kvm:
+            self.cmd_common += " kvm"
+
         self.write_config(
 """
 MACHINE = "%s"