summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Reynwar <ben@reynwar.net>2013-03-10 21:18:36 -0700
committerBen Reynwar <ben@reynwar.net>2013-03-10 21:21:19 -0700
commit67db25ed372477aa0685a040d18faca2ca57f4dc (patch)
treed396abd80b1084ecba971019317927ee6d55151c
parent8d32ed3e8170b327282c34ff0b40a6f170cdedbe (diff)
core: Updating testing environment.
-rw-r--r--gnuradio-core/src/python/gnuradio/ctrlport/CMakeLists.txt7
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt14
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/tag_utils.py8
3 files changed, 21 insertions, 8 deletions
diff --git a/gnuradio-core/src/python/gnuradio/ctrlport/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/ctrlport/CMakeLists.txt
index 994e3a48cf..e2361e9bc5 100644
--- a/gnuradio-core/src/python/gnuradio/ctrlport/CMakeLists.txt
+++ b/gnuradio-core/src/python/gnuradio/ctrlport/CMakeLists.txt
@@ -101,11 +101,16 @@ GR_PYTHON_INSTALL(
########################################################################
if(ENABLE_GR_CTRLPORT)
if(ENABLE_TESTING)
+ set(GR_TEST_TARGET_DEPS "")
+ set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gruel/src/python
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+ )
include(GrTest)
file(GLOB py_qa_test_files "qa_*.py")
foreach(py_qa_test_file ${py_qa_test_files})
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
- set(GR_TEST_TARGET_DEPS gruel gnuradio-core)
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file})
endforeach(py_qa_test_file)
endif(ENABLE_TESTING)
diff --git a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
index da22a5f987..91143fdf18 100644
--- a/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
+++ b/gnuradio-core/src/python/gnuradio/gr/CMakeLists.txt
@@ -40,10 +40,16 @@ GR_PYTHON_INSTALL(FILES
# Handle the unit tests
########################################################################
if(ENABLE_TESTING)
-include(GrTest)
-file(GLOB py_qa_test_files "qa_*.py")
-foreach(py_qa_test_file ${py_qa_test_files})
+ set(GR_TEST_TARGET_DEPS "")
+ set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gruel/src/python
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+ )
+ include(GrTest)
+ file(GLOB py_qa_test_files "qa_*.py")
+ foreach(py_qa_test_file ${py_qa_test_files})
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
-endforeach(py_qa_test_file)
+ endforeach(py_qa_test_file)
endif(ENABLE_TESTING)
diff --git a/gnuradio-core/src/python/gnuradio/gr/tag_utils.py b/gnuradio-core/src/python/gnuradio/gr/tag_utils.py
index 923718fc98..280fa0d376 100644
--- a/gnuradio-core/src/python/gnuradio/gr/tag_utils.py
+++ b/gnuradio-core/src/python/gnuradio/gr/tag_utils.py
@@ -20,10 +20,12 @@
#
""" Conversion tools between stream tags and Python objects """
-try: import pmt
-except: from gruel import pmt
+try:
+ import pmt
+except:
+ from gruel import pmt
-from gnuradio_core import gr_tag_t
+from gnuradio.gr import gr_tag_t
class PythonTag(object):
" Python container for tags "