[oe-commits] [openembedded-core] 02/10: testimage: Allow testing on QEMU machines with a single serial port
git at git.openembedded.org
git at git.openembedded.org
Thu Feb 13 12:19:53 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit a50d0163770f0b405a8de8a8a9cccd48c1de4112
Author: Alejandro Hernandez Samaniego <alejandro at enedino.org>
AuthorDate: Sat Feb 8 02:30:04 2020 -0800
testimage: Allow testing on QEMU machines with a single serial port
commmit 6cde67d0a84 enables the use of qemurunner on machines that
only have a single serial port, but still sets the default value
as serial_ports=2 if not provided.
The testimage class does not call qemurunner with a serial_ports
argument, hence always defaulting to two.
Pass the serial_ports argument from the testimage class to allow
tests to run on QEMU machines with a single serial port.
Signed-off-by: Alejandro Hernandez Samaniego <alejandro at enedino.org>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/testimage.bbclass | 1 +
meta/lib/oeqa/core/target/qemu.py | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 844ed87..0d55c32 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -256,6 +256,7 @@ def testimage_main(d):
'kvm' : kvm,
'slirp' : slirp,
'dump_dir' : d.getVar("TESTIMAGE_DUMP_DIR"),
+ 'serial_ports': len(d.getVar("SERIAL_CONSOLES").split()),
}
# TODO: Currently BBPATH is needed for custom loading of targets.
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index 758703c..008a9f0 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -18,7 +18,7 @@ class OEQemuTarget(OESSHTarget):
def __init__(self, logger, server_ip, timeout=300, user='root',
port=None, machine='', rootfs='', kernel='', kvm=False, slirp=False,
dump_dir='', dump_host_cmds='', display='', bootlog='',
- tmpdir='', dir_image='', boottime=60, **kwargs):
+ tmpdir='', dir_image='', boottime=60, serial_ports=2, **kwargs):
super(OEQemuTarget, self).__init__(logger, None, server_ip, timeout,
user, port)
@@ -35,7 +35,8 @@ class OEQemuTarget(OESSHTarget):
deploy_dir_image=dir_image, display=display,
logfile=bootlog, boottime=boottime,
use_kvm=kvm, use_slirp=slirp, dump_dir=dump_dir,
- dump_host_cmds=dump_host_cmds, logger=logger)
+ dump_host_cmds=dump_host_cmds, logger=logger,
+ serial_ports=serial_ports)
def start(self, params=None, extra_bootparams=None, runqemuparams=''):
if self.use_slirp and not self.server_ip:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list