diff options
Diffstat (limited to 'meta/lib/oeqa/utils/commands.py')
| -rw-r--r-- | meta/lib/oeqa/utils/commands.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index bf2f49d0c0..ca22d69f29 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
| @@ -312,7 +312,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= | |||
| 312 | f.write('LAYERSERIES_COMPAT_%s = "%s"\n' % (templayername, corenames)) | 312 | f.write('LAYERSERIES_COMPAT_%s = "%s"\n' % (templayername, corenames)) |
| 313 | 313 | ||
| 314 | @contextlib.contextmanager | 314 | @contextlib.contextmanager |
| 315 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True): | 315 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, boot_patterns = {}, discard_writes=True): |
| 316 | """ | 316 | """ |
| 317 | Starts a context manager for a 'oeqa.targetcontrol.QemuTarget' resource. | 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 | 318 | The underlying Qemu will be booted into a shell when the generator yields |
| @@ -330,6 +330,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, | |||
| 330 | image_fstype (str): IMAGE_FSTYPE to use | 330 | image_fstype (str): IMAGE_FSTYPE to use |
| 331 | launch_cmd (str): directly run this command and bypass automatic runqemu parameter generation | 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 | 332 | overrides (dict): dict of "'<bitbake-variable>': value" pairs that allows overriding bitbake variables |
| 333 | boot_patterns (dict): dict of "'<pattern-name>': value" pairs to override default boot patterns, e.g. when not booting Linux | ||
| 333 | discard_writes (boolean): enables qemu -snapshot feature to prevent modifying original image | 334 | discard_writes (boolean): enables qemu -snapshot feature to prevent modifying original image |
| 334 | """ | 335 | """ |
| 335 | 336 | ||
| @@ -361,7 +362,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, | |||
| 361 | 362 | ||
| 362 | logdir = recipedata.getVar("TEST_LOG_DIR") | 363 | logdir = recipedata.getVar("TEST_LOG_DIR") |
| 363 | 364 | ||
| 364 | qemu = oeqa.targetcontrol.QemuTarget(recipedata, targetlogger, image_fstype) | 365 | qemu = oeqa.targetcontrol.QemuTarget(recipedata, targetlogger, image_fstype, boot_patterns=boot_patterns) |
| 365 | finally: | 366 | finally: |
| 366 | # We need to shut down tinfoil early here in case we actually want | 367 | # We need to shut down tinfoil early here in case we actually want |
| 367 | # to run tinfoil-using utilities with the running QEMU instance. | 368 | # to run tinfoil-using utilities with the running QEMU instance. |
