summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-06 14:42:40 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-09 12:07:32 +0100
commit0d214406c440eac521a24c27c769e53363493d41 (patch)
tree1b44cee19828bb96bbc3f0b2d593ed66321bfaa1 /scripts/runqemu
parentb2dc9c7ee2431456a562d10d08e6416b13930189 (diff)
downloadpoky-0d214406c440eac521a24c27c769e53363493d41.tar.gz
scripts/runqemu: Add snapshot support
Allow access to the snapshot option of qemu to simplify some of our runtime testing to avoid copying images. (From OE-Core rev: 8fec4a5a004f0e99734f8c0820c66522d08f213e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index fca8d1d29d..9af13f3360 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -162,6 +162,7 @@ class BaseConfig(object):
162 self.lock = '' 162 self.lock = ''
163 self.lock_descriptor = '' 163 self.lock_descriptor = ''
164 self.bitbake_e = '' 164 self.bitbake_e = ''
165 self.snapshot = False
165 self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs') 166 self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 'cpio.gz', 'cpio', 'ramfs')
166 self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso') 167 self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 'iso')
167 168
@@ -328,6 +329,8 @@ class BaseConfig(object):
328 self.vhost_enabled = True 329 self.vhost_enabled = True
329 elif arg == 'slirp': 330 elif arg == 'slirp':
330 self.slirp_enabled = True 331 self.slirp_enabled = True
332 elif arg == 'snapshot':
333 self.snapshot = True
331 elif arg == 'publicvnc': 334 elif arg == 'publicvnc':
332 self.qemu_opt_script += ' -vnc :0' 335 self.qemu_opt_script += ' -vnc :0'
333 elif arg.startswith('tcpserial='): 336 elif arg.startswith('tcpserial='):
@@ -809,6 +812,9 @@ class BaseConfig(object):
809 # Enable virtio RNG else we can run out of entropy in guests 812 # Enable virtio RNG else we can run out of entropy in guests
810 self.qemu_opt += " -device virtio-rng-pci" 813 self.qemu_opt += " -device virtio-rng-pci"
811 814
815 if self.snapshot:
816 self.qemu_opt += " -snapshot"
817
812 if self.serialstdio: 818 if self.serialstdio:
813 logger.info("Interrupt character is '^]'") 819 logger.info("Interrupt character is '^]'")
814 cmd = "stty intr ^]" 820 cmd = "stty intr ^]"