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>2018-12-15 17:10:51 +0000
commit217035f0982bd6e800e5631d54b49be9623cb1f8 (patch)
tree8bf7810b6ee255992dccc649bdd0c6b1f253c1de /meta/classes
parenta785fdbe62595af092e050c19e291596e84fb930 (diff)
downloadpoky-217035f0982bd6e800e5631d54b49be9623cb1f8.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) Signed-off-by: Erik Botö <erik.boto@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 82cbb068ed..8a15c30c79 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -31,6 +31,7 @@ TESTIMAGE_AUTO ??= "0"
31# 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. 31# 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.
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 35
35TEST_LOG_DIR ?= "${WORKDIR}/testimage" 36TEST_LOG_DIR ?= "${WORKDIR}/testimage"
36 37
@@ -63,6 +64,7 @@ TEST_SUITES ?= "${DEFAULT_TEST_SUITES}"
63 64
64TEST_QEMUBOOT_TIMEOUT ?= "1000" 65TEST_QEMUBOOT_TIMEOUT ?= "1000"
65TEST_TARGET ?= "qemu" 66TEST_TARGET ?= "qemu"
67TEST_QEMUPARAMS ?= ""
66 68
67TESTIMAGEDEPENDS = "" 69TESTIMAGEDEPENDS = ""
68TESTIMAGEDEPENDS_append_qemuall = " qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot" 70TESTIMAGEDEPENDS_append_qemuall = " qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot"
@@ -301,7 +303,8 @@ def testimage_main(d):
301 try: 303 try:
302 # We need to check if runqemu ends unexpectedly 304 # We need to check if runqemu ends unexpectedly
303 # or if the worker send us a SIGTERM 305 # or if the worker send us a SIGTERM
304 tc.target.start(extra_bootparams=bootparams) 306 tc.target.start(params=d.getVar("TEST_QEMUPARAMS"),
307 extra_bootparams=bootparams)
305 results = tc.runTests() 308 results = tc.runTests()
306 except (RuntimeError, BlockingIOError) as err: 309 except (RuntimeError, BlockingIOError) as err:
307 if isinstance(err, RuntimeError): 310 if isinstance(err, RuntimeError):