diff options
author | Eric Blossom | 2010-11-23 21:44:15 -0800 |
---|---|---|
committer | Eric Blossom | 2010-11-23 21:44:15 -0800 |
commit | a213cbed474164ed31a26fd4dbdbe3f13c293b6e (patch) | |
tree | 37babefbdc7e4b0f8237015b8673083de9d64e20 /gr-trellis/src/lib | |
parent | 6d39f287754ec8809256853ff96587da34561f47 (diff) | |
download | gnuradio-a213cbed474164ed31a26fd4dbdbe3f13c293b6e.tar.gz gnuradio-a213cbed474164ed31a26fd4dbdbe3f13c293b6e.tar.bz2 gnuradio-a213cbed474164ed31a26fd4dbdbe3f13c293b6e.zip |
Enable guile test for trellis
Diffstat (limited to 'gr-trellis/src/lib')
-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 |
3 files changed, 65 insertions, 3 deletions
diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am index 3e1803554..57982629b 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 000000000..5d08b0dd5 --- /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 000000000..fd650cdf1 --- /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 + |