summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/utils/commands.py')
-rw-r--r--meta/lib/oeqa/utils/commands.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 575e380017..bf2f49d0c0 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -314,7 +314,23 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
314@contextlib.contextmanager 314@contextlib.contextmanager
315def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True): 315def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True):
316 """ 316 """
317 launch_cmd means directly run the command, don't need set rootfs or env vars. 317 Starts a context manager for a 'oeqa.targetcontrol.QemuTarget' resource.
318 The underlying Qemu will be booted into a shell when the generator yields
319 and stopped when the 'with' block exits.
320
321 Usage:
322
323 with runqemu('core-image-minimal') as qemu:
324 qemu.run_serial('cat /proc/cpuinfo')
325
326 Args:
327 pn (str): (image) recipe to run on
328 ssh (boolean): whether or not to enable SSH (network access)
329 runqemuparams (str): space-separated list of params to pass to 'runqemu' script (like 'nographics', 'ovmf', etc.)
330 image_fstype (str): IMAGE_FSTYPE to use
331 launch_cmd (str): directly run this command and bypass automatic runqemu parameter generation
332 overrides (dict): dict of "'<bitbake-variable>': value" pairs that allows overriding bitbake variables
333 discard_writes (boolean): enables qemu -snapshot feature to prevent modifying original image
318 """ 334 """
319 335
320 import bb.tinfoil 336 import bb.tinfoil