From 406e881106de9ce5d09fa6f4c24e08d8ef63cb49 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Mon, 3 Dec 2012 19:43:50 -0500
Subject: ctrlport: fixing up controlport integration into gnuradio-core for
 merge with next.

---
 gnuradio-core/src/python/gnuradio/CMakeLists.txt                | 1 +
 gnuradio-core/src/python/gnuradio/ctrlport/qa_cpp_py_binding.py | 3 ++-
 gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt             | 1 +
 gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py               | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/python/gnuradio/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/CMakeLists.txt
index bf696e0d34..ab46dbb92a 100644
--- a/gnuradio-core/src/python/gnuradio/CMakeLists.txt
+++ b/gnuradio-core/src/python/gnuradio/CMakeLists.txt
@@ -24,6 +24,7 @@ add_subdirectory(gru)
 add_subdirectory(gruimpl)
 add_subdirectory(blks2)
 add_subdirectory(blks2impl)
+add_subdirectory(ctrlport)
 
 GR_PYTHON_INSTALL(FILES
     __init__.py
diff --git a/gnuradio-core/src/python/gnuradio/ctrlport/qa_cpp_py_binding.py b/gnuradio-core/src/python/gnuradio/ctrlport/qa_cpp_py_binding.py
index d4db8e76da..760252b4df 100755
--- a/gnuradio-core/src/python/gnuradio/ctrlport/qa_cpp_py_binding.py
+++ b/gnuradio-core/src/python/gnuradio/ctrlport/qa_cpp_py_binding.py
@@ -135,6 +135,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
         self.src = gr.vector_source_c(data)
         self.p1 = gr.ctrlport_probe_c("aaa","C++ exported variable")
         self.p2 = gr.ctrlport_probe_c("bbb","C++ exported variable")
+        probe_name = self.p2.name() + str(self.p2.unique_id())
 
         self.tb.connect(self.src, self.p1)
         self.tb.connect(self.src, self.p2)
@@ -157,7 +158,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
         radio = GNURadio.ControlPortPrx.checkedCast(base)
 
         # Get all exported knobs
-        ret = radio.get([])
+        ret = radio.get([probe_name + "::bbb"])
         for name in ret.keys():
             result = ret[name].value
             self.assertEqual(result, expected_result)
diff --git a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
index 62f3d7e46d..c5ff2a0c14 100644
--- a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
+++ b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
@@ -47,6 +47,7 @@ foreach(py_qa_test_file ${py_qa_test_files})
         ${CMAKE_SOURCE_DIR}/gruel/src/python
         ${CMAKE_BINARY_DIR}/gruel/src/swig
         ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+        ${CMAKE_BINARY_DIR}/gnuradio-core/src/python/ctrlport
         ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig
     )
     set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core)
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py
index a87ed87eef..239911851c 100755
--- a/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py
+++ b/gnuradio-core/src/python/gnuradio/gr/qa_nlog10.py
@@ -20,6 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
+import sys, time, random, numpy
 from gnuradio import gr, gr_unittest
 
 class test_nlog10(gr_unittest.TestCase):
-- 
cgit v1.2.3