[oe-commits] [openembedded-core] 60/66: scripts/runqemu: Add snapshot support

git at git.openembedded.org git at git.openembedded.org
Wed Sep 7 23:39:04 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 60e55cfad6d70a4cec1ed51453260481bd5a1b3e
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Sep 6 14:42:40 2016 +0100

    scripts/runqemu: Add snapshot support
    
    Allow access to the snapshot option of qemu to simplify some of our runtime
    testing to avoid copying images.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/runqemu | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index 558cbc2..96e0d86 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -162,6 +162,7 @@ class BaseConfig(object):
         self.lock = ''
         self.lock_descriptor = ''
         self.bitbake_e = ''
+        self.snapshot = False
         self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs')
         self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso')
 
@@ -315,6 +316,8 @@ class BaseConfig(object):
                 self.vhost_enabled = True
             elif arg == 'slirp':
                 self.slirp_enabled = True
+            elif arg == 'snapshot':
+                self.snapshot = True
             elif arg == 'publicvnc':
                 self.qemu_opt_script += ' -vnc :0'
             elif arg.startswith('tcpserial='):
@@ -779,6 +782,9 @@ class BaseConfig(object):
         # Enable virtio RNG else we can run out of entropy in guests
         self.qemu_opt += " -device virtio-rng-pci"
 
+        if self.snapshot:
+            self.qemu_opt += " -snapshot"
+
         if self.serialstdio:
             logger.info("Interrupt character is '^]'")
             cmd = "stty intr ^]"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list