From 6b5a0200e260382d61e31dbf016719644163f73b Mon Sep 17 00:00:00 2001 From: jcorgan Date: Sun, 27 Aug 2006 18:51:43 +0000 Subject: [PATCH] Implements ticket:3 and fixes ticket:42. The common functionality of run_tests.in for Python QA has been extracted into run_tests.sh in the top-level and the individual run_tests just invoke that with the right path parameters. Also fixed Cygwin 'make check' bug by adding fix by Don Ward. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3440 221aa14e-8319-0410-a670-987f0aec2ac5 --- Makefile.am | 9 +-- configure.ac | 4 ++ .../src/python/gnuradio/gr/run_tests.in | 43 ++++--------- gr-atsc/src/python/run_tests.in | 57 +++--------------- gr-audio-alsa/src/run_tests.in | 53 +++------------- gr-audio-jack/src/run_tests.in | 53 +++------------- gr-audio-oss/src/run_tests.in | 53 +++------------- gr-audio-osx/src/run_tests.in | 59 +++--------------- gr-audio-portaudio/src/run_tests.in | 53 +++------------- gr-audio-windows/src/run_tests.in | 53 +++------------- gr-comedi/src/run_tests.in | 55 +++-------------- .../src/python/Makefile.am | 2 +- .../src/python/run_tests.in | 55 +++-------------- gr-ezdop/src/python/run_tests.in | 57 +++--------------- gr-gsm-fr-vocoder/src/python/run_tests.in | 57 +++--------------- gr-radar/src/python/run_tests.in | 53 +++------------- gr-radio-astronomy/src/python/run_tests.in | 57 +++--------------- gr-trellis/src/python/run_tests.in | 57 +++--------------- gr-usrp/src/run_tests.in | 60 +++---------------- gr-video-sdl/src/run_tests.in | 53 +++------------- run_tests.sh.in | 55 +++++++++++++++++ 21 files changed, 205 insertions(+), 793 deletions(-) create mode 100644 run_tests.sh.in diff --git a/Makefile.am b/Makefile.am index c71c77bd..1900e370 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,10 +21,11 @@ include $(top_srcdir)/Makefile.common -EXTRA_DIST = \ - bootstrap \ - configure \ - config.h.in +EXTRA_DIST = \ + bootstrap \ + configure \ + config.h.in \ + run_tests.sh.in SUBDIRS = @build_dirs@ DIST_SUBDIRS = @build_dirs@ @skipped_dirs@ diff --git a/configure.ac b/configure.ac index a5e3f514..add98a53 100644 --- a/configure.ac +++ b/configure.ac @@ -189,9 +189,13 @@ AC_SUBST([skipped_dirs], [$skipped_dirs]) AC_CONFIG_FILES([\ Makefile \ + run_tests.sh config/Makefile ]) +dnl run_tests.sh is created from run_tests.in.sh. Make it executable. +AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh]) + AC_OUTPUT echo diff --git a/gnuradio-core/src/python/gnuradio/gr/run_tests.in b/gnuradio-core/src/python/gnuradio/gr/run_tests.in index 87d0afda..107efe72 100755 --- a/gnuradio-core/src/python/gnuradio/gr/run_tests.in +++ b/gnuradio-core/src/python/gnuradio/gr/run_tests.in @@ -1,33 +1,14 @@ #!/bin/sh -swigbld=@abs_top_builddir@/gnuradio-core/src/lib/swig -swigsrc=@abs_top_srcdir@/gnuradio-core/src/lib/swig -py=@abs_top_srcdir@/gnuradio-core/src/python - -PYTHONPATH="$swigbld:$swigbld/.libs:$swigsrc:$py" -export PYTHONPATH - -# for OS/X -DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs" -export DYLD_LIBRARY_PATH - -# Don't load user or system prefs -GR_DONT_LOAD_PREFS=1 -export GR_DONT_LOAD_PREFS - -ok=yes -for file in @srcdir@/qa_*.py -do - echo $file - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +# Note: calling master run_tests.sh in gnuradio core is not strictly +# correct, as it will result in a partially bogus PYTHONPATH, but it +# does make the correct paths in the second half so all is well. + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gnuradio-core \ + @abs_top_builddir@/gnuradio-core \ + @srcdir@ diff --git a/gr-atsc/src/python/run_tests.in b/gr-atsc/src/python/run_tests.in index 36d0c07a..561917fe 100644 --- a/gr-atsc/src/python/run_tests.in +++ b/gr-atsc/src/python/run_tests.in @@ -1,51 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-atsc/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-atsc/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-atsc/src/python - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs" -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-atsc \ + @abs_top_builddir@/gr-atsc \ + @srcdir@ diff --git a/gr-audio-alsa/src/run_tests.in b/gr-audio-alsa/src/run_tests.in index 99d6ffd9..fd396306 100644 --- a/gr-audio-alsa/src/run_tests.in +++ b/gr-audio-alsa/src/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-audio-alsa/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-audio-alsa/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-audio-alsa/src - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-audio-alsa \ + @abs_top_builddir@/gr-audio-alsa \ + @srcdir@ diff --git a/gr-audio-jack/src/run_tests.in b/gr-audio-jack/src/run_tests.in index c90640a7..77af8564 100644 --- a/gr-audio-jack/src/run_tests.in +++ b/gr-audio-jack/src/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-audio-jack/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-audio-jack/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-audio-jack/src - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-audio-jack \ + @abs_top_builddir@/gr-audio-jack \ + @srcdir@ diff --git a/gr-audio-oss/src/run_tests.in b/gr-audio-oss/src/run_tests.in index 402a8c44..b1a64c21 100644 --- a/gr-audio-oss/src/run_tests.in +++ b/gr-audio-oss/src/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-audio-oss/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-audio-oss/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-audio-oss/src - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-audio-oss \ + @abs_top_builddir@/gr-audio-oss \ + @srcdir@ diff --git a/gr-audio-osx/src/run_tests.in b/gr-audio-osx/src/run_tests.in index 7f755f00..d88c275e 100644 --- a/gr-audio-osx/src/run_tests.in +++ b/gr-audio-osx/src/run_tests.in @@ -1,53 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-audio-osx/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-audio-osx/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-audio-osx/src - -# Where to look for GNU Radio python modules in current build tree -# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core -# where it put its python files. -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs" -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-audio-osx \ + @abs_top_builddir@/gr-audio-osx \ + @srcdir@ diff --git a/gr-audio-portaudio/src/run_tests.in b/gr-audio-portaudio/src/run_tests.in index d9f56ba9..0b483dbc 100644 --- a/gr-audio-portaudio/src/run_tests.in +++ b/gr-audio-portaudio/src/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-audio-portaudio/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-audio-portaudio/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-audio-portaudio/src - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-audio-portaudio \ + @abs_top_builddir@/gr-audio-portaudio \ + @srcdir@ diff --git a/gr-audio-windows/src/run_tests.in b/gr-audio-windows/src/run_tests.in index da4a03be..f7de663b 100755 --- a/gr-audio-windows/src/run_tests.in +++ b/gr-audio-windows/src/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-audio-windows/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-audio-windows/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-audio-windows/src - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-audio-windows \ + @abs_top_builddir@/gr-audio-windows \ + @srcdir@ diff --git a/gr-comedi/src/run_tests.in b/gr-comedi/src/run_tests.in index facf62ad..84fefbac 100644 --- a/gr-comedi/src/run_tests.in +++ b/gr-comedi/src/run_tests.in @@ -1,49 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-comedi/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-comedi/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-comedi/src - -# Where to look for GNU Radio python modules in current build tree -# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core -# where it put its python files. -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-comedi \ + @abs_top_builddir@/gr-comedi \ + @srcdir@ diff --git a/gr-error-correcting-codes/src/python/Makefile.am b/gr-error-correcting-codes/src/python/Makefile.am index 61d9fe0a..6014946b 100644 --- a/gr-error-correcting-codes/src/python/Makefile.am +++ b/gr-error-correcting-codes/src/python/Makefile.am @@ -23,7 +23,7 @@ include $(top_srcdir)/Makefile.common EXTRA_DIST = run_tests.in -# Disable qa checks due to non-standard directory structure (eb) +# Disabled until fix for finding an audio module in build tree # TESTS = run_tests noinst_PYTHON = qa_test_coding_1.py qa_test_coding_2.py diff --git a/gr-error-correcting-codes/src/python/run_tests.in b/gr-error-correcting-codes/src/python/run_tests.in index 845ea3a1..8598810f 100644 --- a/gr-error-correcting-codes/src/python/run_tests.in +++ b/gr-error-correcting-codes/src/python/run_tests.in @@ -1,49 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-error-correcting-codes/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-error-correcting-codes/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-error-correcting-codes/src/python - -# Where to look for GNU Radio python modules in current build tree -# FIXME this is wrong on a distcheck. We really need to ask gnuradio-core -# where it put its python files. -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-error-correcting-codes \ + @abs_top_builddir@/gr-error-correcting-codes \ + @srcdir@ diff --git a/gr-ezdop/src/python/run_tests.in b/gr-ezdop/src/python/run_tests.in index 728da1de..118d67dc 100644 --- a/gr-ezdop/src/python/run_tests.in +++ b/gr-ezdop/src/python/run_tests.in @@ -1,51 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-ezdop/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-ezdop/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-ezdop/src/lib - -# Where to look for GNU Radio python modules in current build tree -grbld=@abs_top_srcdir@/gnuradio-core/src/python -grbld=$grbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grbld=$grbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH=@abs_top_builddir@/gnuradio-core/src/lib/.libs:@abs_top_builddir@/ezdop/src/host/ezdop/.libs -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-ezdop \ + @abs_top_builddir@/gr-ezdop \ + @srcdir@ diff --git a/gr-gsm-fr-vocoder/src/python/run_tests.in b/gr-gsm-fr-vocoder/src/python/run_tests.in index 9c39d1d4..96eefc55 100644 --- a/gr-gsm-fr-vocoder/src/python/run_tests.in +++ b/gr-gsm-fr-vocoder/src/python/run_tests.in @@ -1,51 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-gsm-fr-vocoder/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-gsm-fr-vocoder/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-gsm-fr-vocoder/src/python - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs" -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-gsm-fr-vocoder \ + @abs_top_builddir@/gr-gsm-fr-vocoder \ + @srcdir@ diff --git a/gr-radar/src/python/run_tests.in b/gr-radar/src/python/run_tests.in index d3519f4d..0c4ee6a3 100644 --- a/gr-radar/src/python/run_tests.in +++ b/gr-radar/src/python/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@gr-radar/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-radar/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-radar/src/python - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-radar \ + @abs_top_builddir@/gr-radar \ + @srcdir@ diff --git a/gr-radio-astronomy/src/python/run_tests.in b/gr-radio-astronomy/src/python/run_tests.in index a6a726b9..c382145a 100644 --- a/gr-radio-astronomy/src/python/run_tests.in +++ b/gr-radio-astronomy/src/python/run_tests.in @@ -1,51 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-radio-astronomy/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-radio-astronomy/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-radio-astronomy/src/python - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs" -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-radio-astronomy \ + @abs_top_builddir@/gr-radio-astronomy \ + @srcdir@ diff --git a/gr-trellis/src/python/run_tests.in b/gr-trellis/src/python/run_tests.in index 89df2dd6..0da3fc1f 100644 --- a/gr-trellis/src/python/run_tests.in +++ b/gr-trellis/src/python/run_tests.in @@ -1,51 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-trellis/src/lib -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-trellis/src/lib -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-trellis/src/python - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs" -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-trellis \ + @abs_top_builddir@/gr-trellis \ + @srcdir@ diff --git a/gr-usrp/src/run_tests.in b/gr-usrp/src/run_tests.in index 0a582601..a99bd172 100644 --- a/gr-usrp/src/run_tests.in +++ b/gr-usrp/src/run_tests.in @@ -1,54 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-usrp/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-usrp/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-usrp/src - -# Where to look for GNU Radio python modules in current build tree -grbld=@abs_top_srcdir@/gnuradio-core/src/python -grbld=$grbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grbld=$grbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -# Where to look for USRP lib in current build tree -usrpbld=@abs_top_builddir@/usrp/host/lib - -PYTHONPATH="$grbld:$libbld:$libbld/.libs:$libsrc:$py:$usrpbld:$PYTHONPATH" -export PYTHONPATH - -# For OS/X -DYLD_LIBRARY_PATH=@abs_top_builddir@/gnuradio-core/src/lib/.libs:@abs_top_builddir@/usrp/host/lib/.libs -export DYLD_LIBRARY_PATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-usrp \ + @abs_top_builddir@/gr-usrp \ + @srcdir@ diff --git a/gr-video-sdl/src/run_tests.in b/gr-video-sdl/src/run_tests.in index d3097d6d..a0b6ff7e 100644 --- a/gr-video-sdl/src/run_tests.in +++ b/gr-video-sdl/src/run_tests.in @@ -1,47 +1,10 @@ #!/bin/sh -# All this strange PYTHONPATH manipulation is required to run our -# tests using our just built shared library and swig-generated python -# code prior to installation. - -# build tree == src tree unless you're doing a VPATH build. -# If you don't know what a VPATH build is, you're not doing one. Relax... - -prefix=@prefix@ -exec_prefix=@exec_prefix@ - -# Where to look in the build tree for our shared library -libbld=@abs_top_builddir@/gr-video-sdl/src -# Where to look in the src tree for swig generated python code -libsrc=@abs_top_srcdir@/gr-video-sdl/src -# Where to look in the src tree for hand written python code -py=@abs_top_srcdir@/gr-video-sdl/src - -# Where to look for GNU Radio python modules in current build tree -grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig -grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs - -PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH" -export PYTHONPATH - -# -# This is the simple part... -# Run everything that matches qa_*.py and return the final result. -# - -ok=yes -for file in @srcdir@/qa_*.py -do - if ! $file - then - ok=no - fi -done - -if [ $ok = yes ] -then - exit 0 -else - exit 1 -fi +# 1st parameter is absolute path to component source directory +# 2nd parameter is absolute path to component build directory +# 3rd parameter is path to Python QA directory + +@top_builddir@/run_tests.sh \ + @abs_top_srcdir@/gr-video-sdl \ + @abs_top_builddir@/gr-video-sdl \ + @srcdir@ diff --git a/run_tests.sh.in b/run_tests.sh.in new file mode 100644 index 00000000..8e1ad9ca --- /dev/null +++ b/run_tests.sh.in @@ -0,0 +1,55 @@ +#!/bin/sh + +# First argument is absolute path to top of component source directory +# Second argument is absolute path to top of component build directory +# Third argument is component source directory for qa tests + +# Where to find my swig generated shared library +mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs + +# Where to find my swig generated python module +mysrcdir=$1/src:$1/src/lib + +# Where to find my hand written python modules +mypydir=$1/src:$1/src/python + +# Where to find core's swig generated shared libraries +grswigdir=@abs_top_builddir@/gnuradio-core/src/lib/swig +grswigdir=$grswigdir:$grswigdir/.libs + +# Where to find core's python modules +grpydir=@abs_top_srcdir@/gnuradio-core/src/python + +# Where to find core's master library files +grlibdir=@abs_top_srcdir@/gnuradio-core/src/lib +grlibdir=$grlibdir:$grlibdir/.libs + +# Construct search path for python modules +PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grpydir:$PYTHONPATH" +export PYTHONPATH + +# For OS/X +DYLD_LIBRARY_PATH=$grlibdir +export DYLD_LIBRARY_PATH + +# Don't load user or system prefs +GR_DONT_LOAD_PREFS=1 +export GR_DONT_LOAD_PREFS + +# Run everything that matches qa_*.py and return the final result. + +ok=yes +for file in $3/qa_*.py +do + if ! $file + then + ok=no + fi +done + +if [ $ok = yes ] +then + exit 0 +else + exit 1 +fi -- 2.30.2