diff options
Diffstat (limited to 'gr-usrp2/src')
-rw-r--r-- | gr-usrp2/src/.gitignore | 1 | ||||
-rw-r--r-- | gr-usrp2/src/Makefile.am | 14 | ||||
-rw-r--r-- | gr-usrp2/src/run_guile_tests.in | 14 | ||||
-rw-r--r-- | gr-usrp2/src/usrp2.test | 37 |
4 files changed, 58 insertions, 8 deletions
diff --git a/gr-usrp2/src/.gitignore b/gr-usrp2/src/.gitignore index e167cdecc..dd3d18d43 100644 --- a/gr-usrp2/src/.gitignore +++ b/gr-usrp2/src/.gitignore @@ -12,3 +12,4 @@ /guile /python /usrp2_swig.py +/run_guile_tests diff --git a/gr-usrp2/src/Makefile.am b/gr-usrp2/src/Makefile.am index e2cca8b3c..08c41f772 100644 --- a/gr-usrp2/src/Makefile.am +++ b/gr-usrp2/src/Makefile.am @@ -23,9 +23,8 @@ include $(top_srcdir)/Makefile.common include $(top_srcdir)/Makefile.swig TESTS = -EXTRA_DIST += run_tests.in -DISTCLEANFILES += run_tests - +EXTRA_DIST += run_tests.in run_guile_tests.in +DISTCLEANFILES += run_tests run_guile_tests noinst_PYTHON = qa_usrp2.py @@ -33,11 +32,6 @@ if GUILE nobase_guile_DATA = gnuradio/usrp2.scm endif - -# ---------------------------------------------------------------------- -# Miscellaneous build operations -# ---------------------------------------------------------------------- - # ---------------------------------------------------------------------- # C++ block API interface librar(ies) # @@ -114,3 +108,7 @@ usrp2_swig_python = \ if PYTHON TESTS += run_tests endif + +if GUILE +TESTS += run_guile_tests +endif diff --git a/gr-usrp2/src/run_guile_tests.in b/gr-usrp2/src/run_guile_tests.in new file mode 100644 index 000000000..5d08b0dd5 --- /dev/null +++ b/gr-usrp2/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-usrp2/src/usrp2.test b/gr-usrp2/src/usrp2.test new file mode 100644 index 000000000..69544c5e6 --- /dev/null +++ b/gr-usrp2/src/usrp2.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 USRP2 attached, powered up etc. + +(use-modules (gnuradio usrp2)) |