diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-01-23 17:17:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-26 13:39:37 +0000 |
commit | f7718fa8ae8ead3c6fdfc1da58a2f9b9c719699f (patch) | |
tree | 5cd3076a4ce5a60ce222de4d2f6fbf787e0fed71 /meta/classes/testimage.bbclass | |
parent | 7ea988887c577aa6c62bdada8db7218d852d9edd (diff) | |
download | poky-f7718fa8ae8ead3c6fdfc1da58a2f9b9c719699f.tar.gz |
testimage.bbclass: add support for passing runqemu params
This is particularly useful when setting up GL tests.
(From OE-Core rev: 167a46775059b782c6f82ce8c5a47b27262e95d4)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r-- | meta/classes/testimage.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index cb8c12acce..ff1c53b93e 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -32,6 +32,7 @@ TESTIMAGE_AUTO ??= "0" | |||
32 | # Booting is handled by this class, and it's not a test in itself. | 32 | # Booting is handled by this class, and it's not a test in itself. |
33 | # TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt. | 33 | # TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt. |
34 | # TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB. | 34 | # TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB. |
35 | # TEST_RUNQEMUPARAMS can be used to pass extra parameters to runqemu, e.g. "gl" to enable OpenGL acceleration. | ||
35 | 36 | ||
36 | TEST_LOG_DIR ?= "${WORKDIR}/testimage" | 37 | TEST_LOG_DIR ?= "${WORKDIR}/testimage" |
37 | 38 | ||
@@ -65,6 +66,7 @@ TEST_SUITES ?= "${DEFAULT_TEST_SUITES}" | |||
65 | TEST_QEMUBOOT_TIMEOUT ?= "1000" | 66 | TEST_QEMUBOOT_TIMEOUT ?= "1000" |
66 | TEST_TARGET ?= "qemu" | 67 | TEST_TARGET ?= "qemu" |
67 | TEST_QEMUPARAMS ?= "" | 68 | TEST_QEMUPARAMS ?= "" |
69 | TEST_RUNQEMUPARAMS ?= "" | ||
68 | 70 | ||
69 | TESTIMAGEDEPENDS = "" | 71 | TESTIMAGEDEPENDS = "" |
70 | TESTIMAGEDEPENDS_append_qemuall = " qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot" | 72 | 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): | |||
294 | try: | 296 | try: |
295 | # We need to check if runqemu ends unexpectedly | 297 | # We need to check if runqemu ends unexpectedly |
296 | # or if the worker send us a SIGTERM | 298 | # or if the worker send us a SIGTERM |
297 | tc.target.start(params=d.getVar("TEST_QEMUPARAMS")) | 299 | tc.target.start(params=d.getVar("TEST_QEMUPARAMS"), runqemuparams=d.getVar("TEST_RUNQEMUPARAMS")) |
298 | results = tc.runTests() | 300 | results = tc.runTests() |
299 | except (RuntimeError, BlockingIOError) as err: | 301 | except (RuntimeError, BlockingIOError) as err: |
300 | if isinstance(err, RuntimeError): | 302 | if isinstance(err, RuntimeError): |