diff options
Diffstat (limited to 'gr-fcd/python')
-rw-r--r-- | gr-fcd/python/fcd/CMakeLists.txt (renamed from gr-fcd/python/CMakeLists.txt) | 19 | ||||
-rw-r--r-- | gr-fcd/python/fcd/__init__.py (renamed from gr-fcd/python/__init__.py) | 8 | ||||
-rwxr-xr-x | gr-fcd/python/fcd/qa_fcd.py (renamed from gr-fcd/python/qa_fcd.py) | 3 | ||||
-rw-r--r-- | gr-fcd/python/fcd/run_tests.in (renamed from gr-fcd/python/run_tests.in) | 0 |
4 files changed, 18 insertions, 12 deletions
diff --git a/gr-fcd/python/CMakeLists.txt b/gr-fcd/python/fcd/CMakeLists.txt index 39ec5efe9e..7fe226a0f7 100644 --- a/gr-fcd/python/CMakeLists.txt +++ b/gr-fcd/python/fcd/CMakeLists.txt @@ -32,16 +32,17 @@ GR_PYTHON_INSTALL( ######################################################################## if(ENABLE_TESTING) -list(APPEND GR_TEST_PYTHON_DIRS - ${CMAKE_BINARY_DIR}/gr-fcd/python - ${CMAKE_BINARY_DIR}/gr-fcd/swig -) -list(APPEND GR_TEST_TARGET_DEPS gnuradio-audio gnuradio-fcd) + 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}) + 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/gr-fcd/python/__init__.py b/gr-fcd/python/fcd/__init__.py index 559c4f407e..e7cd7f40ed 100644 --- a/gr-fcd/python/__init__.py +++ b/gr-fcd/python/fcd/__init__.py @@ -22,6 +22,12 @@ ''' Provides a source block for the FunCube Dongle hardware. ''' +import os -from fcd_swig import * +try: + from fcd_swig import * +except ImportError: + dirname, filename = os.path.split(os.path.abspath(__file__)) + __path__.append(os.path.join(dirname, "..", "..", "swig")) + from fcd_swig import * diff --git a/gr-fcd/python/qa_fcd.py b/gr-fcd/python/fcd/qa_fcd.py index 0993cab425..33771be5ff 100755 --- a/gr-fcd/python/qa_fcd.py +++ b/gr-fcd/python/fcd/qa_fcd.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import fcd_swig +from gnuradio import gr, gr_unittest, fcd class test_fcd(gr_unittest.TestCase): diff --git a/gr-fcd/python/run_tests.in b/gr-fcd/python/fcd/run_tests.in index 4d28c1522d..4d28c1522d 100644 --- a/gr-fcd/python/run_tests.in +++ b/gr-fcd/python/fcd/run_tests.in |