mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
b41e1c9209
commit
383cd20828
@@ -176,8 +176,8 @@ class QemuTarget(BaseTarget):
|
|||||||
bb.note("Qemu log file: %s" % self.qemulog)
|
bb.note("Qemu log file: %s" % self.qemulog)
|
||||||
super(QemuTarget, self).deploy()
|
super(QemuTarget, self).deploy()
|
||||||
|
|
||||||
def start(self, params=None, ssh=True, extra_bootparams=None):
|
def start(self, params=None, ssh=True, extra_bootparams=None, runqemuparams=''):
|
||||||
if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams):
|
if self.runner.start(params, get_ip=ssh, extra_bootparams=extra_bootparams, runqemuparams=runqemuparams):
|
||||||
if ssh:
|
if ssh:
|
||||||
self.ip = self.runner.ip
|
self.ip = self.runner.ip
|
||||||
self.server_ip = self.runner.server_ip
|
self.server_ip = self.runner.server_ip
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
|
|||||||
|
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def runqemu(pn, ssh=True):
|
def runqemu(pn, ssh=True, runqemuparams=''):
|
||||||
|
|
||||||
import bb.tinfoil
|
import bb.tinfoil
|
||||||
import bb.build
|
import bb.build
|
||||||
@@ -260,7 +260,7 @@ def runqemu(pn, ssh=True):
|
|||||||
try:
|
try:
|
||||||
qemu.deploy()
|
qemu.deploy()
|
||||||
try:
|
try:
|
||||||
qemu.start(ssh=ssh)
|
qemu.start(ssh=ssh, runqemuparams=runqemuparams)
|
||||||
except bb.build.FuncFailed:
|
except bb.build.FuncFailed:
|
||||||
raise Exception('Failed to start QEMU - see the logs in %s' % logdir)
|
raise Exception('Failed to start QEMU - see the logs in %s' % logdir)
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ class QemuRunner:
|
|||||||
self._dump_host()
|
self._dump_host()
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
def start(self, qemuparams = None, get_ip = True, extra_bootparams = None):
|
def start(self, qemuparams = None, get_ip = True, extra_bootparams = None, runqemuparams=''):
|
||||||
if self.display:
|
if self.display:
|
||||||
os.environ["DISPLAY"] = self.display
|
os.environ["DISPLAY"] = self.display
|
||||||
# Set this flag so that Qemu doesn't do any grabs as SDL grabs
|
# Set this flag so that Qemu doesn't do any grabs as SDL grabs
|
||||||
@@ -136,7 +136,7 @@ class QemuRunner:
|
|||||||
self.origchldhandler = signal.getsignal(signal.SIGCHLD)
|
self.origchldhandler = signal.getsignal(signal.SIGCHLD)
|
||||||
signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
|
signal.signal(signal.SIGCHLD, self.handleSIGCHLD)
|
||||||
|
|
||||||
launch_cmd = 'runqemu snapshot '
|
launch_cmd = 'runqemu snapshot %s ' % runqemuparams
|
||||||
if self.use_kvm:
|
if self.use_kvm:
|
||||||
logger.info('Using kvm for runqemu')
|
logger.info('Using kvm for runqemu')
|
||||||
launch_cmd += 'kvm '
|
launch_cmd += 'kvm '
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class QemuTinyRunner(QemuRunner):
|
|||||||
with open(self.logfile, "a") as f:
|
with open(self.logfile, "a") as f:
|
||||||
f.write("%s" % msg)
|
f.write("%s" % msg)
|
||||||
|
|
||||||
def start(self, qemuparams = None, ssh=True, extra_bootparams=None):
|
def start(self, qemuparams = None, ssh=True, extra_bootparams=None, runqemuparams=''):
|
||||||
|
|
||||||
if self.display:
|
if self.display:
|
||||||
os.environ["DISPLAY"] = self.display
|
os.environ["DISPLAY"] = self.display
|
||||||
|
|||||||
Reference in New Issue
Block a user