diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2019-01-04 15:15:45 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-08 11:16:44 +0000 |
commit | c75b8f33bf3726de4f062bf2eeda2302bcced064 (patch) | |
tree | 05e4d88c52675a72b923ff97ab292eb85f0d82ed /meta/lib/oeqa/selftest/cases | |
parent | 274b941b8b27cb79cdd1bb5ed68ad04d301762c5 (diff) | |
download | poky-c75b8f33bf3726de4f062bf2eeda2302bcced064.tar.gz |
oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is set
(From OE-Core rev: 564de3681353fe8e203425388e8be9703a89d2da)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/runqemu.py | 5 |
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 @@ | |||
5 | import re | 5 | import re |
6 | import tempfile | 6 | import tempfile |
7 | import time | 7 | import time |
8 | import oe.types | ||
8 | from oeqa.selftest.case import OESelftestTestCase | 9 | from oeqa.selftest.case import OESelftestTestCase |
9 | from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd | 10 | from oeqa.utils.commands import bitbake, runqemu, get_bb_var, runCmd |
10 | from oeqa.core.decorator.oeid import OETestID | 11 | from oeqa.core.decorator.oeid import OETestID |
@@ -22,6 +23,10 @@ class RunqemuTests(OESelftestTestCase): | |||
22 | self.fstypes = "ext4 iso hddimg wic.vmdk wic.qcow2 wic.vdi" | 23 | self.fstypes = "ext4 iso hddimg wic.vmdk wic.qcow2 wic.vdi" |
23 | self.cmd_common = "runqemu nographic" | 24 | self.cmd_common = "runqemu nographic" |
24 | 25 | ||
26 | kvm = oe.types.qemu_use_kvm(get_bb_var('QEMU_USE_KVM'), 'x86_64') | ||
27 | if kvm: | ||
28 | self.cmd_common += " kvm" | ||
29 | |||
25 | self.write_config( | 30 | self.write_config( |
26 | """ | 31 | """ |
27 | MACHINE = "%s" | 32 | MACHINE = "%s" |