summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorErik Botö <erik.boto@gmail.com>2018-12-14 19:53:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 22:27:45 +0000
commit07b748ba62b5471d012ab7d0f406ddeb8bcd4ff6 (patch)
treeeb9be467af9a1abd4cc7d7273f8f64de54e23b4d /meta/classes
parent2e1b7400b295a9a15f3a54c572bdc1dfcf3c2fe8 (diff)
downloadpoky-07b748ba62b5471d012ab7d0f406ddeb8bcd4ff6.tar.gz
testimage: Add possibility to pass parmeters to qemu
Add a variable called TEST_QEMUPARAMS in testimage.bbclass to make it possible to pass parameters to qemu. This can be useful for e.g. increasing the amount of RAM available during testimage runs. (From OE-Core rev: 1a9163f5779d233c884c8fd50e0812eabab4fdf3) (From OE-Core rev: 643457d350a921379600248f99d73374e6a2f5a2) Signed-off-by: Erik Botö <erik.boto@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/testimage.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 7d148d7262..20dbe8ddd7 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -26,6 +26,7 @@ inherit metadata_scm
26# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login. 26# TEST_LOG_DIR contains a command ssh log and may contain infromation about what command is running, output and return codes and for qemu a boot log till login.
27# Booting is handled by this class, and it's not a test in itself. 27# Booting is handled by this class, and it's not a test in itself.
28# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt. 28# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt.
29# TEST_QEMUPARAMS can be used to pass extra parameters to qemu, e.g. "-m 1024" for setting the amount of ram to 1 GB.
29 30
30TEST_LOG_DIR ?= "${WORKDIR}/testimage" 31TEST_LOG_DIR ?= "${WORKDIR}/testimage"
31 32
@@ -58,6 +59,7 @@ TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
58 59
59TEST_QEMUBOOT_TIMEOUT ?= "1000" 60TEST_QEMUBOOT_TIMEOUT ?= "1000"
60TEST_TARGET ?= "qemu" 61TEST_TARGET ?= "qemu"
62TEST_QEMUPARAMS ?= ""
61 63
62TESTIMAGEDEPENDS = "" 64TESTIMAGEDEPENDS = ""
63TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot" 65TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot"
@@ -292,7 +294,8 @@ def testimage_main(d):
292 try: 294 try:
293 # We need to check if runqemu ends unexpectedly 295 # We need to check if runqemu ends unexpectedly
294 # or if the worker send us a SIGTERM 296 # or if the worker send us a SIGTERM
295 tc.target.start(extra_bootparams=bootparams) 297 tc.target.start(params=d.getVar("TEST_QEMUPARAMS"),
298 extra_bootparams=bootparams)
296 results = tc.runTests() 299 results = tc.runTests()
297 except (RuntimeError, BlockingIOError) as err: 300 except (RuntimeError, BlockingIOError) as err:
298 if isinstance(err, RuntimeError): 301 if isinstance(err, RuntimeError):