diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-03-06 17:10:09 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-08 11:52:56 +0000 |
commit | 383cd20828e4a0f88f2d9659aafe5d0a162e8fbc (patch) | |
tree | e0db2b2ad4b52aa3e725f649fa5b9a3e72f60087 /meta/lib/oeqa | |
parent | b41e1c92099fb29f8db76cf6501e5d02a456630c (diff) | |
download | poky-383cd20828e4a0f88f2d9659aafe5d0a162e8fbc.tar.gz |
qemurunner: add runqemuparams argument to commands.runqemu
Added possibility to pass additional runqemu parameters
down the stack of APIs:
commands.runqemu -> QemuTarget.start -> QemuRunner.start
This will be used to pass ovmf parameter in testing of
efi wic images under qemu.
(From OE-Core rev: 5aa4b5a10fb8191cd3453d09701c8beeff9a952f)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-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 d1f441f841..dbd2c7ca1e 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -176,8 +176,8 @@ class QemuTarget(BaseTarget): | |||
176 | bb.note("Qemu log file: %s" % self.qemulog) | 176 | bb.note("Qemu log file: %s" % self.qemulog) |
177 | super(QemuTarget, self).deploy() | 177 | super(QemuTarget, self).deploy() |
178 | 178 | ||
179 | def start(self, params=None, ssh=True, extra_bootparams=None): | 179 | def start(self, params=None, ssh=True, extra_bootparams=None, runqemuparams=''): |
180 | if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams): | 180 | if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams): |
181 | if ssh: | 181 | if ssh: |
182 | self.ip = self.runner.ip | 182 | self.ip = self.runner.ip |
183 | self.server_ip = self.runner.server_ip | 183 | self.server_ip = self.runner.server_ip |
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 0425c9fd98..73ede2379f 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -218,7 +218,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= | |||
218 | 218 | ||
219 | 219 | ||
220 | @contextlib.contextmanager | 220 | @contextlib.contextmanager |
221 | def runqemu(pn, ssh=True): | 221 | def runqemu(pn, ssh=True, runqemuparams=''): |
222 | 222 | ||
223 | import bb.tinfoil | 223 | import bb.tinfoil |
224 | import bb.build | 224 | import bb.build |
@@ -260,7 +260,7 @@ def runqemu(pn, ssh=True): | |||
260 | try: | 260 | try: |
261 | qemu.deploy() | 261 | qemu.deploy() |
262 | try: | 262 | try: |
263 | qemu.start(ssh=ssh) | 263 | qemu.start(ssh=ssh, runqemuparams=runqemuparams) |
264 | except bb.build.FuncFailed: | 264 | except bb.build.FuncFailed: |
265 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) | 265 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) |
266 | 266 | ||
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 21bc35a32c..19f0f92b74 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -95,7 +95,7 @@ class QemuRunner: | |||
95 | self._dump_host() | 95 | self._dump_host() |
96 | raise SystemExit | 96 | raise SystemExit |
97 | 97 | ||
98 | def start(self, qemuparams = None, get_ip = True, extra_bootparams = None): | 98 | def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams=''): |
99 | if self.display: | 99 | if self.display: |
100 | os.environ["DISPLAY"] = self.display | 100 | os.environ["DISPLAY"] = self.display |
101 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs | 101 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs |
@@ -136,7 +136,7 @@ class QemuRunner: | |||
136 | self.origchldhandler = signal.getsignal(signal.SIGCHLD) | 136 | self.origchldhandler = signal.getsignal(signal.SIGCHLD) |
137 | signal.signal(signal.SIGCHLD, self.handleSIGCHLD) | 137 | signal.signal(signal.SIGCHLD, self.handleSIGCHLD) |
138 | 138 | ||
139 | launch_cmd = 'runqemu snapshot ' | 139 | launch_cmd = 'runqemu snapshot %s ' % runqemuparams |
140 | if self.use_kvm: | 140 | if self.use_kvm: |
141 | logger.info('Using kvm for runqemu') | 141 | logger.info('Using kvm for runqemu') |
142 | launch_cmd += 'kvm ' | 142 | launch_cmd += 'kvm ' |
diff --git a/meta/lib/oeqa/utils/qemutinyrunner.py b/meta/lib/oeqa/utils/qemutinyrunner.py index d554f0dbcd..ec52473834 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): | 63 | def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams=''): |
64 | 64 | ||
65 | if self.display: | 65 | if self.display: |
66 | os.environ["DISPLAY"] = self.display | 66 | os.environ["DISPLAY"] = self.display |