]> code.ossystems Code Review - openembedded-core.git/commit
oeqa: allow customizing image used by runqemu()
authorPatrick Ohly <patrick.ohly@intel.com>
Tue, 28 Mar 2017 08:02:18 +0000 (10:02 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Mar 2017 08:16:10 +0000 (09:16 +0100)
commit4c6ba32abd6b9de33f4b8a0b87e8a56432ed7825
tree44192b18341ff589d49a273a8ced7e937b028193
parentb2a1cf09ea65ed6f561886b1b4241f9adf3e5709
oeqa: allow customizing image used by runqemu()

runqemu() takes all parameters for the virtual machine from the
variables of the given recipe. By allowing the caller to provide a
hash with variables that get applied locally, the caller gets more
control.

Here's the intended usage:

   <prepare internal-image in self.resultdir>
   overrides = {
        'DEPLOY_DIR_IMAGE': self.resultdir,
        'IMAGE_LINK_NAME': 'internal-image-%s' % self.image_arch,
   }
   with runqemu('refkit-installer-image', ssh=False,
                 overrides=overrides) as qemu:
       ....

This can be used to replace the image completely with something else
or to copy it before allowing runqemu() to write into it.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/commands.py