diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | config/grc_gr_pager.m4 | 5 | ||||
-rw-r--r-- | gr-pager/swig/Makefile.am | 11 | ||||
-rw-r--r-- | gr-pager/swig/gnuradio/pager.scm | 28 | ||||
-rw-r--r-- | gr-pager/swig/pager.test | 36 | ||||
-rw-r--r-- | gr-pager/swig/run_guile_tests.in | 14 |
6 files changed, 92 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index 836c6c7b9..41ea212b6 100644 --- a/.gitignore +++ b/.gitignore @@ -80,7 +80,6 @@ gr-noaa/swig/gnuradio/ gr-noaa/swig/guile/ gr-noaa/swig/noaa_swig.scm gr-noaa/swig/python/ -gr-pager/swig/gnuradio/ gr-pager/swig/guile/ gr-pager/swig/pager_swig.scm gr-pager/swig/python/ diff --git a/config/grc_gr_pager.m4 b/config/grc_gr_pager.m4 index cdd6177af..5330fce3a 100644 --- a/config/grc_gr_pager.m4 +++ b/config/grc_gr_pager.m4 @@ -32,10 +32,13 @@ AC_DEFUN([GRC_GR_PAGER],[ gr-pager/python/Makefile \ gr-pager/python/run_tests \ gr-pager/swig/Makefile \ + gr-pager/swig/run_guile_tests \ ]) GRC_BUILD_CONDITIONAL(gr-pager,[ dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_pager], [chmod +x gr-pager/python/run_tests]) + AC_CONFIG_COMMANDS([run_tests_pager], + [chmod +x gr-pager/python/run_tests + chmod +x gr-pager/swig/run_guile_tests]) ]) ]) diff --git a/gr-pager/swig/Makefile.am b/gr-pager/swig/Makefile.am index c59bdb0f2..fe22753e3 100644 --- a/gr-pager/swig/Makefile.am +++ b/gr-pager/swig/Makefile.am @@ -20,6 +20,9 @@ # include $(top_srcdir)/Makefile.common +include $(top_srcdir)/Makefile.swig + +TESTS = AM_CPPFLAGS = \ -I$(top_srcdir)/gr-pager/lib \ @@ -27,6 +30,9 @@ AM_CPPFLAGS = \ $(PYTHON_CPPFLAGS) \ $(WITH_INCLUDES) +nobase_guile_DATA = \ + gnuradio/pager.scm + ############################## # SWIG interface and library TOP_SWIG_IFILES = \ @@ -51,10 +57,13 @@ pager_swig_swiginclude_headers = \ pager_flex_sync.i \ pager_slicer_fb.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 GUILE +TESTS += run_guile_tests +endif
\ No newline at end of file diff --git a/gr-pager/swig/gnuradio/pager.scm b/gr-pager/swig/gnuradio/pager.scm new file mode 100644 index 000000000..99331b09c --- /dev/null +++ b/gr-pager/swig/gnuradio/pager.scm @@ -0,0 +1,28 @@ +;;; +;;; 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/>. +;;; + +;;; Module that just re-exports the pager_swig module + +(define-module (gnuradio pager) + #:use-module (gnuradio export-safely) + #:use-module (gnuradio pager_swig) + #:duplicates (merge-generics replace check)) + +(re-export-all '(gnuradio pager_swig)) + diff --git a/gr-pager/swig/pager.test b/gr-pager/swig/pager.test new file mode 100644 index 000000000..a5deb5810 --- /dev/null +++ b/gr-pager/swig/pager.test @@ -0,0 +1,36 @@ +;;; -*- 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)) + +;;; Confirm we can import the module... +(use-modules (gnuradio pager)) + diff --git a/gr-pager/swig/run_guile_tests.in b/gr-pager/swig/run_guile_tests.in new file mode 100644 index 000000000..5d08b0dd5 --- /dev/null +++ b/gr-pager/swig/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@ |