diff options
author | Eric Blossom | 2010-11-12 15:04:10 -0800 |
---|---|---|
committer | Eric Blossom | 2010-11-12 15:04:10 -0800 |
commit | 76e2fa796a42df7951f05f73428e178c84879b79 (patch) | |
tree | cf0529954d36b04ca17c86b8eb55a45a97a925cf | |
parent | 2947504322ac5105f9181adbdbd035aa02ad0f41 (diff) | |
download | gnuradio-76e2fa796a42df7951f05f73428e178c84879b79.tar.gz gnuradio-76e2fa796a42df7951f05f73428e178c84879b79.tar.bz2 gnuradio-76e2fa796a42df7951f05f73428e178c84879b79.zip |
make check in gr-audio-alsa now confirms ability to load guile bindings.
-rw-r--r-- | config/grc_gr_audio_alsa.m4 | 4 | ||||
-rw-r--r-- | gnuradio-core/src/guile/run_guile_tests.in | 6 | ||||
-rw-r--r-- | gr-audio-alsa/src/Makefile.am | 9 | ||||
-rw-r--r-- | gr-audio-alsa/src/audio_alsa.test | 38 | ||||
-rw-r--r-- | gr-audio-alsa/src/run_guile_tests.in | 14 | ||||
-rw-r--r-- | setup_guile_test_env.in | 13 |
6 files changed, 70 insertions, 14 deletions
diff --git a/config/grc_gr_audio_alsa.m4 b/config/grc_gr_audio_alsa.m4 index d6955980d..35389d81d 100644 --- a/config/grc_gr_audio_alsa.m4 +++ b/config/grc_gr_audio_alsa.m4 @@ -37,11 +37,13 @@ AC_DEFUN([GRC_GR_AUDIO_ALSA],[ gr-audio-alsa/Makefile \ gr-audio-alsa/gnuradio-audio-alsa.pc \ gr-audio-alsa/src/Makefile \ + gr-audio-alsa/src/run_guile_tests \ gr-audio-alsa/src/run_tests \ ]) GRC_BUILD_CONDITIONAL(gr-audio-alsa,[ dnl run_tests is created from run_tests.in. Make it executable. - AC_CONFIG_COMMANDS([run_tests_alsa], [chmod +x gr-audio-alsa/src/run_tests]) + AC_CONFIG_COMMANDS([run_tests_alsa], + [chmod +x gr-audio-alsa/src/run_tests gr-audio-alsa/src/run_guile_tests]) ]) ]) diff --git a/gnuradio-core/src/guile/run_guile_tests.in b/gnuradio-core/src/guile/run_guile_tests.in index ceaa84108..3aca7bdb0 100644 --- a/gnuradio-core/src/guile/run_guile_tests.in +++ b/gnuradio-core/src/guile/run_guile_tests.in @@ -2,11 +2,11 @@ . @top_builddir@/setup_guile_test_env -# 1st argument is absolute path to component C++ shared library build directory -# 2nd argument is absolute path to hand coded guile source directory +# 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 -# We're in gnuradio-core, we don't need this +# We're in gnuradio-core, we don't need these # add_local_paths \ # "" \ # "" \ diff --git a/gr-audio-alsa/src/Makefile.am b/gr-audio-alsa/src/Makefile.am index 705bd2072..813bf3138 100644 --- a/gr-audio-alsa/src/Makefile.am +++ b/gr-audio-alsa/src/Makefile.am @@ -21,7 +21,9 @@ include $(top_srcdir)/Makefile.common -EXTRA_DIST = run_tests.in +TESTS = + +EXTRA_DIST = run_tests.in run_guile_tests.in # C/C++ headers get installed in ${prefix}/include/gnuradio grinclude_HEADERS = \ @@ -35,8 +37,9 @@ noinst_PYTHON = \ qa_alsa.py if GUILE + TESTS += run_guile_tests noinst_GUILE = \ - qa_alsa.scm + audio_alsa.test endif AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) @@ -60,7 +63,7 @@ libgnuradio_audio_alsa_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) if PYTHON ################################### # SWIG Python interface and library -TESTS = run_tests +TESTS += run_tests DISTCLEANFILES = run_tests TOP_SWIG_IFILES = \ diff --git a/gr-audio-alsa/src/audio_alsa.test b/gr-audio-alsa/src/audio_alsa.test new file mode 100644 index 000000000..edf425b9f --- /dev/null +++ b/gr-audio-alsa/src/audio_alsa.test @@ -0,0 +1,38 @@ +;;; -*- 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. + +(use-modules (gnuradio test-suite lib)) +(use-modules (gnuradio core)) +(use-modules (oop goops)) + +;;; Just see if we can import the module... +;;; They may not have ALSA drivers, etc. + +(use-modules (gnuradio audio_alsa)) + + + diff --git a/gr-audio-alsa/src/run_guile_tests.in b/gr-audio-alsa/src/run_guile_tests.in new file mode 100644 index 000000000..5d08b0dd5 --- /dev/null +++ b/gr-audio-alsa/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/setup_guile_test_env.in b/setup_guile_test_env.in index 4878a4413..23456f31d 100644 --- a/setup_guile_test_env.in +++ b/setup_guile_test_env.in @@ -12,8 +12,8 @@ abs_top_builddir=@abs_top_builddir@ # FIXME add in withdirs -# 1st argument is absolute path to component C++ shared library build directory -# 2nd argument is absolute path to hand coded guile source directory +# 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 function add_local_paths(){ @@ -22,11 +22,10 @@ function add_local_paths(){ echo "$0: requires 3 args" 1>&2 exit 1 fi - echo FIXME: $0: implement add_local_paths - # [ -n "$1" ] && prepend LTDL_LIBRARY_PATH "$1/.libs" - # [ -n "$2" ] && prepend GUILE_LOAD_PATH "$2" - # [ -n "$3" ] && prepend LTDL_LIBRARY_PATH "$3/.libs" - # [ -n "$3" ] && prepend GUILE_LOAD_PATH "$3/guile" + [ -n "$1" ] && prepend GUILE_LOAD_PATH "$1" + [ -n "$2" ] && prepend LTDL_LIBRARY_PATH "$2/.libs" + [ -n "$3" ] && prepend LTDL_LIBRARY_PATH "$3/.libs" + [ -n "$3" ] && prepend GUILE_LOAD_PATH "$3" } # usage: prepend <path-varname> <dir> |