[oe-commits] [openembedded-core] 06/28: testimage.bbclass: add support for passing runqemu params
git at git.openembedded.org
git at git.openembedded.org
Thu Jan 24 12:55:45 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 3feb20916c104f8ba8a6716945b770bed0ccef73
Author: Alexander Kanavin <alex.kanavin at gmail.com>
AuthorDate: Wed Jan 23 17:17:40 2019 +0100
testimage.bbclass: add support for passing runqemu params
This is particularly useful when setting up GL tests.
Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/testimage.bbclass | 4 +++-
meta/lib/oeqa/core/target/qemu.py | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index cb8c12a..ff1c53b 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -32,6 +32,7 @@ TESTIMAGE_AUTO ??= "0"
# Booting is handled by this class, and it's not a test in itself.
# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt.
# TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB.
+# TEST_RUNQEMUPARAMS can be used to pass extra parameters to runqemu, e.g. "gl" to enable OpenGL acceleration.
TEST_LOG_DIR ?= "${WORKDIR}/testimage"
@@ -65,6 +66,7 @@ TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
TEST_QEMUBOOT_TIMEOUT ?= "1000"
TEST_TARGET ?= "qemu"
TEST_QEMUPARAMS ?= ""
+TEST_RUNQEMUPARAMS ?= ""
TESTIMAGEDEPENDS = ""
TESTIMAGEDEPENDS_append_qemuall = " qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot"
@@ -294,7 +296,7 @@ def testimage_main(d):
try:
# We need to check if runqemu ends unexpectedly
# or if the worker send us a SIGTERM
- tc.target.start(params=d.getVar("TEST_QEMUPARAMS"))
+ tc.target.start(params=d.getVar("TEST_QEMUPARAMS"), runqemuparams=d.getVar("TEST_RUNQEMUPARAMS"))
results = tc.runTests()
except (RuntimeError, BlockingIOError) as err:
if isinstance(err, RuntimeError):
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index f47fd74..7a161a3 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -33,11 +33,11 @@ class OEQemuTarget(OESSHTarget):
use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir,
dump_host_cmds=dump_host_cmds, logger=logger)
- def start(self, params=None, extra_bootparams=None):
+ def start(self, params=None, extra_bootparams=None, runqemuparams=''):
if self.use_slirp and not self.server_ip:
self.logger.error("Could not start qemu with slirp without server ip - provide 'TEST_SERVER_IP'")
raise RuntimeError("FAILED to start qemu - check the task log and the boot log")
- if self.runner.start(params, extra_bootparams=extra_bootparams):
+ if self.runner.start(params, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams):
self.ip = self.runner.ip
if self.use_slirp:
target_ip_port = self.runner.ip.split(':')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list