diff options
author | Eric Blossom <eb@comsec.com> | 2010-11-23 21:44:15 -0800 |
---|---|---|
committer | Eric Blossom <eb@comsec.com> | 2010-11-23 21:44:15 -0800 |
commit | a213cbed474164ed31a26fd4dbdbe3f13c293b6e (patch) | |
tree | 37babefbdc7e4b0f8237015b8673083de9d64e20 | |
parent | 6d39f287754ec8809256853ff96587da34561f47 (diff) |
Enable guile test for trellis
-rw-r--r-- | config/grc_gr_trellis.m4 | 7 | ||||
-rw-r--r-- | gr-trellis/src/lib/Makefile.am | 15 | ||||
-rw-r--r-- | gr-trellis/src/lib/run_guile_tests.in | 14 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis.test | 39 |
4 files changed, 70 insertions, 5 deletions
diff --git a/config/grc_gr_trellis.m4 b/config/grc_gr_trellis.m4 index cb51325d65..bc9ca6f495 100644 --- a/config/grc_gr_trellis.m4 +++ b/config/grc_gr_trellis.m4 @@ -1,4 +1,4 @@ -dnl Copyright 2001,2002,2003,2004,2005,2006,2008 Free Software Foundation, Inc. +dnl Copyright 2001,2002,2003,2004,2005,2006,2008,2010 Free Software Foundation, Inc. dnl dnl This file is part of GNU Radio dnl @@ -29,6 +29,7 @@ AC_DEFUN([GRC_GR_TRELLIS],[ gr-trellis/doc/Makefile \ gr-trellis/src/Makefile \ gr-trellis/src/lib/Makefile \ + gr-trellis/src/lib/run_guile_tests \ gr-trellis/src/python/Makefile \ gr-trellis/src/python/run_tests \ gr-trellis/src/examples/Makefile \ @@ -37,6 +38,8 @@ AC_DEFUN([GRC_GR_TRELLIS],[ GRC_BUILD_CONDITIONAL(gr-trellis,[ dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_gr_trellis], [chmod +x gr-trellis/src/python/run_tests]) + AC_CONFIG_COMMANDS([run_tests_gr_trellis], + [chmod +x gr-trellis/src/python/run_tests; + chmod +x gr-trellis/src/lib/run_guile_tests]) ]) ]) diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am index 3e1803554b..57982629ba 100644 --- a/gr-trellis/src/lib/Makefile.am +++ b/gr-trellis/src/lib/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc. +# Copyright 2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -20,6 +20,14 @@ # include $(top_srcdir)/Makefile.common +include $(top_srcdir)/Makefile.swig + +TESTS = + +EXTRA_DIST = \ + run_guile_tests.in \ + trellis.test + AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) @@ -85,7 +93,6 @@ libgnuradio_trellis_la_LIBADD = \ libgnuradio_trellis_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) -if PYTHON ################################# # SWIG interface and library @@ -130,7 +137,6 @@ gen_sources_deps = $(core_generator) par_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py include $(top_srcdir)/Makefile.par.gen -include $(top_srcdir)/Makefile.swig # add some of the variables generated inside the Makefile.swig.gen BUILT_SOURCES = \ @@ -139,4 +145,7 @@ BUILT_SOURCES = \ # Do not distribute the output of SWIG no_dist_files = $(swig_built_sources) + +if GUILE +TESTS += run_guile_tests endif diff --git a/gr-trellis/src/lib/run_guile_tests.in b/gr-trellis/src/lib/run_guile_tests.in new file mode 100644 index 0000000000..5d08b0dd53 --- /dev/null +++ b/gr-trellis/src/lib/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-trellis/src/lib/trellis.test b/gr-trellis/src/lib/trellis.test new file mode 100644 index 0000000000..fd650cdf1c --- /dev/null +++ b/gr-trellis/src/lib/trellis.test @@ -0,0 +1,39 @@ +;;; -*- 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)) + + +;;; See if we can import the module... +(use-modules (gnuradio trellis)) + +;;; Now do some real testing, like that in ../python/qa_trellis.py + |