diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-03-28 10:02:19 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-28 10:34:37 +0100 |
commit | c76abc379ed3e0205e1a244968cae87b8e6e0936 (patch) | |
tree | d27cf5b27933522c8e595b209dd496c342701718 /meta/lib/oeqa/utils/qemutinyrunner.py | |
parent | 9a94208600fbc852304cd99e2d1fa787caf9b0fa (diff) | |
download | poky-c76abc379ed3e0205e1a244968cae87b8e6e0936.tar.gz |
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().
(From OE-Core rev: 969d079a33a57f5a8f7af86d7bab04d35ab07584)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/qemutinyrunner.py')
-rw-r--r-- | meta/lib/oeqa/utils/qemutinyrunner.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py index df5f9ddb82..1bf59007ff 100644 --- a/meta/lib/oeqa/utils/qemutinyrunner.py +++ b/meta/lib/oeqa/utils/qemutinyrunner.py | |||
@@ -60,7 +60,7 @@ class QemuTinyRunner(QemuRunner): | |||
60 | with open(self.logfile, "a") as f: | 60 | with open(self.logfile, "a") as f: |
61 | f.write("%s" % msg) | 61 | f.write("%s" % msg) |
62 | 62 | ||
63 | def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams=''): | 63 | def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams='', discard_writes=True): |
64 | 64 | ||
65 | if self.display: | 65 | if self.display: |
66 | os.environ["DISPLAY"] = self.display | 66 | os.environ["DISPLAY"] = self.display |