[oe-commits] [openembedded-core] 18/33: oeqa/target/ssh oeqa/target/qemu: expose server listening port to tests

git at git.openembedded.org git at git.openembedded.org
Mon Dec 16 23:27:59 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit ca58559fc30842c123907fb5cc68b3356c530862
Author: André Draszik <git at andred.net>
AuthorDate: Thu Dec 12 21:52:11 2019 +0000

    oeqa/target/ssh oeqa/target/qemu: expose server listening port to tests
    
    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 at andred.net>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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 081c627..758703c 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 51032ef..63fc946 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 = [

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list