summaryrefslogtreecommitdiff
path: root/gr-audio-alsa
diff options
context:
space:
mode:
authorEric Blossom2010-11-12 15:04:10 -0800
committerEric Blossom2010-11-12 15:04:10 -0800
commit76e2fa796a42df7951f05f73428e178c84879b79 (patch)
treecf0529954d36b04ca17c86b8eb55a45a97a925cf /gr-audio-alsa
parent2947504322ac5105f9181adbdbd035aa02ad0f41 (diff)
downloadgnuradio-76e2fa796a42df7951f05f73428e178c84879b79.tar.gz
gnuradio-76e2fa796a42df7951f05f73428e178c84879b79.tar.bz2
gnuradio-76e2fa796a42df7951f05f73428e178c84879b79.zip
make check in gr-audio-alsa now confirms ability to load guile bindings.
Diffstat (limited to 'gr-audio-alsa')
-rw-r--r--gr-audio-alsa/src/Makefile.am9
-rw-r--r--gr-audio-alsa/src/audio_alsa.test38
-rw-r--r--gr-audio-alsa/src/run_guile_tests.in14
3 files changed, 58 insertions, 3 deletions
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@