From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/4] oeqa/target/ssh oeqa/target/qemu: expose server listening port to tests
Date: Thu, 12 Dec 2019 21:52:11 +0000 [thread overview]
Message-ID: <20191212215212.27089-4-git@andred.net> (raw)
In-Reply-To: <20191212215212.27089-1-git@andred.net>
Allow tests to access the listening port as just introduced.
Note that when using qemu this infrastructure shouldn't be
needed, but we still need to set the port to 0 so that
a listening port is determined automatically (e.g. by the
python http server).
Signed-off-by: André Draszik <git@andred.net>
---
meta/lib/oeqa/core/target/qemu.py | 1 +
meta/lib/oeqa/core/target/ssh.py | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index 081c627b01..758703c0d1 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -24,6 +24,7 @@ class OEQemuTarget(OESSHTarget):
user, port)
self.server_ip = server_ip
+ self.server_port = 0
self.machine = machine
self.rootfs = rootfs
self.kernel = kernel
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 51032ef1a9..63fc9468b3 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -15,7 +15,7 @@ from . import OETarget
class OESSHTarget(OETarget):
def __init__(self, logger, ip, server_ip, timeout=300, user='root',
- port=None, **kwargs):
+ port=None, server_port=0, **kwargs):
if not logger:
logger = logging.getLogger('target')
logger.setLevel(logging.INFO)
@@ -30,6 +30,7 @@ class OESSHTarget(OETarget):
super(OESSHTarget, self).__init__(logger)
self.ip = ip
self.server_ip = server_ip
+ self.server_port = server_port
self.timeout = timeout
self.user = user
ssh_options = [
--
2.24.0
next prev parent reply other threads:[~2019-12-12 21:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-12 21:52 [PATCH 0/4] support OEQA inside container André Draszik
2019-12-12 21:52 ` [PATCH 1/4] oeqa/utils/httpserver: allow to pass in listening port André Draszik
2019-12-12 21:52 ` [PATCH 2/4] oeqa/runtime/context.py: support listening port in TEST_SERVER_IP André Draszik
2019-12-12 21:52 ` André Draszik [this message]
2019-12-12 21:52 ` [PATCH 4/4] oeqa/runtime/apt dnf opkg: support running from within docker container André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191212215212.27089-4-git@andred.net \
--to=git@andred.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.