diff options
author | Eric Blossom | 2010-11-24 00:06:15 -0800 |
---|---|---|
committer | Eric Blossom | 2010-11-24 00:06:15 -0800 |
commit | 64bdee166b0d852992873f7d37906d4c61a94b94 (patch) | |
tree | a659e229061f09f7ee3a4538eaa5d1e18dd8fcca /gr-usrp/src | |
parent | ac0b247d245dcc9cfd3e376c0e0ab2b6f18376d4 (diff) | |
download | gnuradio-64bdee166b0d852992873f7d37906d4c61a94b94.tar.gz gnuradio-64bdee166b0d852992873f7d37906d4c61a94b94.tar.bz2 gnuradio-64bdee166b0d852992873f7d37906d4c61a94b94.zip |
Confirm we can load guile usrp module
Diffstat (limited to 'gr-usrp/src')
-rw-r--r-- | gr-usrp/src/Makefile.am | 17 | ||||
-rw-r--r-- | gr-usrp/src/gnuradio/usrp.scm | 27 | ||||
-rw-r--r-- | gr-usrp/src/run_guile_tests.in | 14 | ||||
-rw-r--r-- | gr-usrp/src/usrp.test | 37 |
4 files changed, 92 insertions, 3 deletions
diff --git a/gr-usrp/src/Makefile.am b/gr-usrp/src/Makefile.am index db5be4ade..9c1f4b525 100644 --- a/gr-usrp/src/Makefile.am +++ b/gr-usrp/src/Makefile.am @@ -20,6 +20,7 @@ # include $(top_srcdir)/Makefile.common +include $(top_srcdir)/Makefile.swig # ---------------------------------------------------------------- # Misc. build/installation activities @@ -30,6 +31,10 @@ DISTCLEANFILES = run_tests noinst_PYTHON = qa_usrp.py +nobase_guile_DATA = gnuradio/usrp.scm + +TESTS = + # ---------------------------------------------------------------- # The straight C++ library @@ -67,10 +72,8 @@ grinclude_HEADERS = \ usrp_source_c.h \ usrp_source_s.h -if PYTHON # ---------------------------------------------------------------- # The SWIG library -TESTS = run_tests TOP_SWIG_IFILES = \ usrp_swig.i @@ -105,11 +108,19 @@ usrp_swig_swiginclude_headers = \ usrp_sink_s.i \ usrp_standard.i -include $(top_srcdir)/Makefile.swig # add some of the variables generated inside the Makefile.swig.gen BUILT_SOURCES = $(swig_built_sources) # Do not distribute the output of SWIG no_dist_files = $(swig_built_sources) + + +if PYTHON +TESTS += run_tests endif + +if GUILE +TESTS += run_guile_tests +endif + diff --git a/gr-usrp/src/gnuradio/usrp.scm b/gr-usrp/src/gnuradio/usrp.scm new file mode 100644 index 000000000..e01c9454a --- /dev/null +++ b/gr-usrp/src/gnuradio/usrp.scm @@ -0,0 +1,27 @@ +;;; +;;; Copyright 2010 Free Software Foundation, Inc. +;;; +;;; This file is part of GNU Radio +;;; +;;; GNU Radio is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3, or (at your option) +;;; any later version. +;;; +;;; GNU Radio is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see <http://www.gnu.org/licenses/>. +;;; + +;;; Semi bogus module that just re-exports the usrp_swig module + +(define-module (gnuradio usrp) + #:use-module (gnuradio export-safely) + #:use-module (gnuradio usrp_swig) + #:duplicates (merge-generics replace check)) + +(re-export-all '(gnuradio usrp_swig)) diff --git a/gr-usrp/src/run_guile_tests.in b/gr-usrp/src/run_guile_tests.in new file mode 100644 index 000000000..5d08b0dd5 --- /dev/null +++ b/gr-usrp/src/run_guile_tests.in @@ -0,0 +1,14 @@ +#!/bin/sh + +. @top_builddir@/setup_guile_test_env + +# 1st argument is absolute path to hand coded guile source directory +# 2nd argument is absolute path to component C++ shared library build directory +# 3nd argument is absolute path to component SWIG build directory + +add_local_paths \ + @srcdir@ \ + @abs_builddir@ \ + @abs_builddir@ + +@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t @srcdir@ diff --git a/gr-usrp/src/usrp.test b/gr-usrp/src/usrp.test new file mode 100644 index 000000000..740fe3055 --- /dev/null +++ b/gr-usrp/src/usrp.test @@ -0,0 +1,37 @@ +;;; -*- Scheme -*- +;;; +;;; Copyright 2010 Free Software Foundation, Inc. +;;; +;;; This file is part of GNU Radio +;;; +;;; GNU Radio is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3, or (at your option) +;;; any later version. +;;; +;;; GNU Radio is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see <http://www.gnu.org/licenses/>. +;;; + +;;; If you're using Emacs's Scheme mode: +;;; (put 'with-test-prefix 'scheme-indent-function 1) + +;;; See the comments in gnuradio/test-suite/lib.scm for info on writing tests. +;;; See also the very end of the file, where the test-equal, test-eqv +;;; and test-eq macros are defined. + +(define-module (test-module) + #:use-module (oop goops) + #:use-module (gnuradio core) + #:use-module (gnuradio test-suite lib) + #:duplicates (merge-generics replace check)) + +;;; Just see if we can import the module... +;;; They may not have a USRP attached and powered up + +(use-modules (gnuradio usrp)) |