Skip to contentSkip to conversation

oeqa/runtime/context.py: Add support to specify port in target_ip

PATCH New Aníbal Limón 1 participant 1 message Jun 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/runtime/context.py: Add support to specify port in target_ip

---
 meta/lib/oeqa/runtime/context.py | 6 ++++++
 1 file changed, 6 insertions(+)
meta/lib/oeqa/runtime/context.py +6 -0
index c4cd76c..0294003 100644
@@ -92,6 +92,12 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
     def getTarget(target_type, logger, target_ip, server_ip, **kwargs):
         target = None
 
+        if target_ip:
+            target_ip_port = target_ip.split(':')
+            if len(target_ip_port) == 2:
+                target_ip = target_ip_port[0]
+                kwargs['port'] = target_ip_port[1]
+
         if target_type == 'simpleremote':
             target = OESSHTarget(logger, target_ip, server_ip, **kwargs)
         elif target_type == 'qemu':
Signature · 1 line
2.1.4