diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-03-28 10:02:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-28 10:34:36 +0100 |
commit | 41b67f1176fd923ff7d61f63a95325a1482bf579 (patch) | |
tree | b64e62f3ada961376bbd0283fcc1565442da668c /meta | |
parent | 9a3f10590bbad47df55fb8c6248e3b119c798865 (diff) | |
download | poky-41b67f1176fd923ff7d61f63a95325a1482bf579.tar.gz |
oeqa: allow extending qemuparams="..."
Sometimes it is useful to reconfigure the qemu virtual machine
directly. runqemu has the "qemuparams" parameter for that, and the
underlying start() methods also supported modifying that via their
"params" parameter. Only the runqemu() wrapper function lacked
a way to specify additional parameters.
One potential usage is to attach additional disks.
(From OE-Core rev: b2a1cf09ea65ed6f561886b1b4241f9adf3e5709)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index cd7a5e3b12..3dfff0f6d7 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -225,7 +225,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= | |||
225 | 225 | ||
226 | 226 | ||
227 | @contextlib.contextmanager | 227 | @contextlib.contextmanager |
228 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None): | 228 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None): |
229 | """ | 229 | """ |
230 | launch_cmd means directly run the command, don't need set rootfs or env vars. | 230 | launch_cmd means directly run the command, don't need set rootfs or env vars. |
231 | """ | 231 | """ |
@@ -276,7 +276,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None): | |||
276 | try: | 276 | try: |
277 | qemu.deploy() | 277 | qemu.deploy() |
278 | try: | 278 | try: |
279 | qemu.start(ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd) | 279 | qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd) |
280 | except bb.build.FuncFailed: | 280 | except bb.build.FuncFailed: |
281 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) | 281 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) |
282 | 282 | ||