]> code.ossystems Code Review - openembedded-core.git/commit
oeqa: allow persistent image writes in runqemu()
authorPatrick Ohly <patrick.ohly@intel.com>
Tue, 28 Mar 2017 08:02:19 +0000 (10:02 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Mar 2017 08:16:10 +0000 (09:16 +0100)
commit969d079a33a57f5a8f7af86d7bab04d35ab07584
tree8023896281e605154aac2a5b90ef6a97d5bc0481
parent4c6ba32abd6b9de33f4b8a0b87e8a56432ed7825
oeqa: allow persistent image writes in runqemu()

By default, QemuRunner avoids modifying the image files that it boots
into by enabling the qemu snapshot mode. However, some tests may want
to test changes that must persists across reboots, so this mode
should be optional.

This can be combined by copying the image file to a temporary location
first and then booting with that copy. It's also useful when testing
with additional drives attached to a virtual machine.

QemuTinyRunner doesn't use the snapshot parameter and therefore ignores
the new parameter.

Long term, a better way of passing these various configuration
parameters should be used, and perhaps QemuRunner and QemuTinyRunner
can be merged into one again to avoid code duplication. But for now
the patch follows the exiting style.

Also beware that QemuTarget.start() now acts in two different modes
(with or without explicit launch command), and depending on that mode
parameters like discard_writes must be ignored, i.e. not get passed to
launch().

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