commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 42/50: controlport: QA needs to get host an


From: git
Subject: [Commit-gnuradio] [gnuradio] 42/50: controlport: QA needs to get host and port out of the endpoint.
Date: Wed, 15 Apr 2015 21:07:57 +0000 (UTC)

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

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 9073e7a1eab5187c92142d9c74e463c58f0c4a03
Author: Tom Rondeau <address@hidden>
Date:   Tue Mar 10 15:06:20 2015 -0400

    controlport: QA needs to get host and port out of the endpoint.
    
    Probably need a better parsing strategy.
---
 gr-blocks/python/blocks/qa_cpp_py_binding.py     |  7 ++++--
 gr-blocks/python/blocks/qa_cpp_py_binding_set.py |  7 ++++--
 gr-blocks/python/blocks/qa_ctrlport_probes.py    | 28 +++++++++++++++++++-----
 3 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding.py 
b/gr-blocks/python/blocks/qa_cpp_py_binding.py
index 820c672..23a5c9b 100644
--- a/gr-blocks/python/blocks/qa_cpp_py_binding.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding.py
@@ -24,7 +24,7 @@
 # This program tests mixed python and c++ ctrlport exports in a single app
 #
 
-import sys, time, random, numpy
+import sys, time, random, numpy, re
 from gnuradio import gr, gr_unittest, blocks
 
 from gnuradio.ctrlport import GNURadio
@@ -152,10 +152,13 @@ class test_cpp_py_binding(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         # Get all exported knobs
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py 
b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
index 0f2e58d..5b81de0 100644
--- a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
@@ -24,7 +24,7 @@
 # This program tests mixed python and c++ GRCP sets in a single app
 #
 
-import sys, time, random, numpy
+import sys, time, random, numpy, re
 from gnuradio import gr, gr_unittest, blocks
 
 from gnuradio.ctrlport import GNURadio
@@ -119,10 +119,13 @@ class test_cpp_py_binding_set(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         self.tb.start()
diff --git a/gr-blocks/python/blocks/qa_ctrlport_probes.py 
b/gr-blocks/python/blocks/qa_ctrlport_probes.py
index 6bdad7e..c678846 100644
--- a/gr-blocks/python/blocks/qa_ctrlport_probes.py
+++ b/gr-blocks/python/blocks/qa_ctrlport_probes.py
@@ -22,7 +22,7 @@
 
 import sys, time, random, numpy
 from gnuradio import gr, gr_unittest, blocks
-import os, struct
+import os, struct, re
 
 from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
 
@@ -46,6 +46,7 @@ class test_ctrlport_probes(gr_unittest.TestCase):
         self.tb.connect(self.src, self.probe)
         self.tb.start()
 
+
         # Probes return complex values as list of floats with re, im
         # Imaginary parts of this data set are 0.
         expected_result = [1, 2, 3, 4,
@@ -56,10 +57,13 @@ class test_ctrlport_probes(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         # Get all exported knobs
@@ -94,10 +98,13 @@ class test_ctrlport_probes(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         # Get all exported knobs
@@ -131,10 +138,13 @@ class test_ctrlport_probes(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         # Get all exported knobs
@@ -169,10 +179,13 @@ class test_ctrlport_probes(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         # Get all exported knobs
@@ -206,10 +219,13 @@ class test_ctrlport_probes(gr_unittest.TestCase):
 
         # Get available endpoint
         ep = gr.rpcmanager_get().endpoints()[0]
+        hostname = re.search("-h (\S+|\d+\.\d+\.\d+\.\d+)", ep).group(1)
+        portnum = re.search("-p (\d+)", ep).group(1)
+        argv = [None, hostname, portnum]
 
         # Initialize a simple ControlPort client from endpoint
         from gnuradio.ctrlport.GNURadioControlPortClient import 
GNURadioControlPortClient
-        radiosys = GNURadioControlPortClient(rpcmethod='thrift')
+        radiosys = GNURadioControlPortClient(argv=argv, rpcmethod='thrift')
         radio = radiosys.client
 
         # Get all exported knobs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]