diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | config/grc_gnuradio_core.m4 | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | gnuradio-core/src/guile/.gitignore | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | gnuradio-core/src/guile/gnuradio/test-suite/guile-test (renamed from gnuradio-core/src/guile/gnuradio/test-suite/guile-test.in) | 2 | ||||
-rw-r--r-- | gnuradio-core/src/guile/run_guile_tests.in | 15 | ||||
-rw-r--r-- | setup_guile_test_env.in (renamed from run_guile_tests.sh.in) | 71 |
7 files changed, 40 insertions, 57 deletions
diff --git a/.gitignore b/.gitignore index 32f9529d0..2e9c0e2a2 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,7 @@ make.log /compile /build /run_tests.sh -/run_guile_tests.sh +/setup_guile_test_env ### ### Put these here until we get this all sorted out ### diff --git a/config/grc_gnuradio_core.m4 b/config/grc_gnuradio_core.m4 index 5095f18f7..8cbba49ef 100644 --- a/config/grc_gnuradio_core.m4 +++ b/config/grc_gnuradio_core.m4 @@ -83,7 +83,6 @@ AC_DEFUN([GRC_GNURADIO_CORE],[ gnuradio-core/src/gen_interpolator_taps/Makefile \ gnuradio-core/src/guile/Makefile \ gnuradio-core/src/guile/run_guile_tests \ - gnuradio-core/src/guile/gnuradio/test-suite/guile-test \ gnuradio-core/src/lib/Makefile \ gnuradio-core/src/lib/filter/Makefile \ gnuradio-core/src/lib/g72x/Makefile \ @@ -117,7 +116,6 @@ AC_DEFUN([GRC_GNURADIO_CORE],[ [ chmod +x gnuradio-core/src/python/gnuradio/gr/run_tests chmod +x gnuradio-core/src/guile/run_guile_tests - chmod +x gnuradio-core/src/guile/gnuradio/test-suite ]) ]) ]) diff --git a/configure.ac b/configure.ac index d8804a0fa..1e17f8d6a 100644 --- a/configure.ac +++ b/configure.ac @@ -429,12 +429,12 @@ AC_SUBST(with_LIBDIRPATH) AC_CONFIG_FILES([\ Makefile \ run_tests.sh \ - run_guile_tests.sh \ + setup_guile_test_env \ config/Makefile ]) dnl run_tests.sh is created from run_tests.sh.in . Make it executable. -AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh run_guile_tests.sh]) +AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh]) AC_OUTPUT diff --git a/gnuradio-core/src/guile/.gitignore b/gnuradio-core/src/guile/.gitignore index bc212f566..82a29a907 100644 --- a/gnuradio-core/src/guile/.gitignore +++ b/gnuradio-core/src/guile/.gitignore @@ -2,4 +2,3 @@ /Makefile.in /run_guile_tests /guile.log -/gnuradio/test-suite/guile-test diff --git a/gnuradio-core/src/guile/gnuradio/test-suite/guile-test.in b/gnuradio-core/src/guile/gnuradio/test-suite/guile-test index 4d82f7592..6dc1a9658 100755..100644 --- a/gnuradio-core/src/guile/gnuradio/test-suite/guile-test.in +++ b/gnuradio-core/src/guile/gnuradio/test-suite/guile-test @@ -1,4 +1,4 @@ -#!@GUILE@ \ +#!/usr/bin/guile \ -e main -s !# diff --git a/gnuradio-core/src/guile/run_guile_tests.in b/gnuradio-core/src/guile/run_guile_tests.in index 2ef160397..e52497332 100644 --- a/gnuradio-core/src/guile/run_guile_tests.in +++ b/gnuradio-core/src/guile/run_guile_tests.in @@ -1,12 +1,15 @@ #!/bin/sh +. @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 # 3nd argument is absolute path to component SWIG build directory -# 4rd argument is absolute path to component Guile QA test directory -@top_builddir@/run_guile_tests.sh \ - "" \ - "" \ - "" \ - @abs_top_srcdir@/gnuradio-core/src/guile +# We're in gnuradio-core, we don't need this +# add_local_paths \ +# "" \ +# "" \ +# "" + +@GUILE@ -e main -c '(use-modules (gnuradio test-suite guile-test))' -t tests diff --git a/run_guile_tests.sh.in b/setup_guile_test_env.in index 269365775..4878a4413 100644 --- a/run_guile_tests.sh.in +++ b/setup_guile_test_env.in @@ -1,20 +1,35 @@ #!/bin/sh +# This is sourced by run_guile_tests to establish the environment +# variables required to run the tests in the build tree. + +abs_top_srcdir=@abs_top_srcdir@ +abs_top_builddir=@abs_top_builddir@ + + +# FIXME add in OS/X DYLD_LIBRARY_PATH +# FIXME add in cywin*/win*/mingw* PATH +# 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 # 3nd argument is absolute path to component SWIG build directory -# 4rd argument is absolute path to component Guile QA test directory - -if [ $# -ne 4 ] -then - echo "$0: requires 4 args" 1>&2 - exit 1 -fi -abs_top_srcdir=@abs_top_srcdir@ -abs_top_builddir=@abs_top_builddir@ +function add_local_paths(){ + if [ $# -ne 3 ] + then + 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" +} -# usage: prepend <path> <dir> +# usage: prepend <path-varname> <dir> function prepend(){ if [ $# -ne 2 ] then @@ -40,8 +55,8 @@ function prepend(){ } # ------------------------------------------------------------------------ -# For now, everybody gets gruel and gnuradio-core for free -# FIXME eventually this should be gruel and gnuradio-runtime +# Everybody gets gruel and gnuradio-core for free. +# FIXME Eventually this should be gruel and gnuradio-runtime. # ------------------------------------------------------------------------ # Where to search for not yet installed C++ shared libraries @@ -55,13 +70,6 @@ prepend mylibdir $abs_top_builddir/gnuradio-core/src/lib/swig/.libs prepend guile_load_path $abs_top_srcdir/gnuradio-core/src/guile prepend guile_load_path $abs_top_builddir/gnuradio-core/src/lib/swig -# ------------------------------------------------------------------------ -# FIXME add the stuff from the args - -echo $0: FIXME add stuff from args 1>&2 - -# ------------------------------------------------------------------------ - #echo "mylibdir = $mylibdir" #echo "guile_load_path = $guile_load_path" @@ -71,28 +79,3 @@ prepend GUILE_LOAD_PATH "$guile_load_path" export LTDL_LIBRARY_PATH export GUILE_LOAD_PATH export GUILE_WARN_DEPRECATED=no - -# Run everything that matches qa_*.scm and return the final result. - -ok=yes -for file in $4/qa_*.scm -do - # echo $file - @GUILE@ -s $file - r=$? - if [ $r -ne 0 ] - then - if [ $r -ge 128 ] # killed by a signal - then - exit $r - fi - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi |