diff options
| -rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 4 | ||||
| -rw-r--r-- | meta/lib/oeqa/utils/commands.py | 4 | ||||
| -rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 | ||||
| -rw-r--r-- | meta/lib/oeqa/utils/qemutinyrunner.py | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index c3aeb221dd..3255e3a5c6 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
| @@ -183,11 +183,11 @@ class QemuTarget(BaseTarget): | |||
| 183 | logger.info("Qemu log file: %s" % self.qemulog) | 183 | logger.info("Qemu log file: %s" % self.qemulog) |
| 184 | super(QemuTarget, self).deploy() | 184 | super(QemuTarget, self).deploy() |
| 185 | 185 | ||
| 186 | def start(self, params=None, ssh=True, extra_bootparams='', runqemuparams='', launch_cmd=''): | 186 | def start(self, params=None, ssh=True, extra_bootparams='', runqemuparams='', launch_cmd='', discard_writes=True): |
| 187 | if launch_cmd: | 187 | if launch_cmd: |
| 188 | start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd) | 188 | start = self.runner.launch(get_ip=ssh, launch_cmd=launch_cmd) |
| 189 | else: | 189 | else: |
| 190 | start = self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams) | 190 | start = self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams, discard_writes=discard_writes) |
| 191 | 191 | ||
| 192 | if start: | 192 | if start: |
| 193 | if ssh: | 193 | if ssh: |
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 88c9bb15ed..2951dfb49c 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
| @@ -225,7 +225,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= | |||
| 225 | 225 | ||
| 226 | 226 | ||
| 227 | @contextlib.contextmanager | 227 | @contextlib.contextmanager |
| 228 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}): | 228 | def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, qemuparams=None, overrides={}, discard_writes=True): |
| 229 | """ | 229 | """ |
| 230 | launch_cmd means directly run the command, don't need set rootfs or env vars. | 230 | launch_cmd means directly run the command, don't need set rootfs or env vars. |
| 231 | """ | 231 | """ |
| @@ -278,7 +278,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None, | |||
| 278 | try: | 278 | try: |
| 279 | qemu.deploy() | 279 | qemu.deploy() |
| 280 | try: | 280 | try: |
| 281 | qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd) | 281 | qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes) |
| 282 | except bb.build.FuncFailed: | 282 | except bb.build.FuncFailed: |
| 283 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) | 283 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) |
| 284 | 284 | ||
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index b7816167e8..ba44b96f53 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
| @@ -97,7 +97,7 @@ class QemuRunner: | |||
| 97 | self._dump_host() | 97 | self._dump_host() |
| 98 | raise SystemExit | 98 | raise SystemExit |
| 99 | 99 | ||
| 100 | def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams='', launch_cmd=None): | 100 | def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams='', launch_cmd=None, discard_writes=True): |
| 101 | if self.display: | 101 | if self.display: |
| 102 | os.environ["DISPLAY"] = self.display | 102 | os.environ["DISPLAY"] = self.display |
| 103 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs | 103 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs |
| @@ -118,7 +118,7 @@ class QemuRunner: | |||
| 118 | os.environ["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image | 118 | os.environ["DEPLOY_DIR_IMAGE"] = self.deploy_dir_image |
| 119 | 119 | ||
| 120 | if not launch_cmd: | 120 | if not launch_cmd: |
| 121 | launch_cmd = 'runqemu snapshot %s' % runqemuparams | 121 | launch_cmd = 'runqemu %s %s ' % ('snapshot' if discard_writes else '', runqemuparams) |
| 122 | if self.use_kvm: | 122 | if self.use_kvm: |
| 123 | logger.info('Using kvm for runqemu') | 123 | logger.info('Using kvm for runqemu') |
| 124 | launch_cmd += ' kvm' | 124 | launch_cmd += ' kvm' |
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 |
