Imported Upstream version 3.0
[debian/gnuradio] / run_tests.sh.in
1 #!/bin/sh
2
3 # First argument is absolute path to top of component source directory
4 # Second argument is absolute path to top of component build directory
5 # Third argument is component source directory for qa tests
6
7 # Where to find my swig generated shared library
8 mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs
9
10 # Where to find my swig generated python module
11 mysrcdir=$1/src:$1/src/lib
12
13 # Where to find my hand written python modules
14 mypydir=$1/src:$1/src/python
15
16 # Where to find core's swig generated shared libraries
17 grswigdir=@abs_top_builddir@/gnuradio-core/src/lib/swig
18 grswigdir=$grswigdir:$grswigdir/.libs
19
20 # Where to find core's python modules
21 grpydir=@abs_top_srcdir@/gnuradio-core/src/python
22
23 # Where to find core's master library files
24 grlibdir=@abs_top_srcdir@/gnuradio-core/src/lib
25 grlibdir=$grlibdir:$grlibdir/.libs
26
27 # Construct search path for python modules
28 PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grpydir:$PYTHONPATH"
29 export PYTHONPATH
30
31 # For OS/X
32 DYLD_LIBRARY_PATH=$grlibdir
33 export DYLD_LIBRARY_PATH
34
35 # For Win32
36 PATH=$grlibdir:$PATH
37
38 # Don't load user or system prefs
39 GR_DONT_LOAD_PREFS=1
40 export GR_DONT_LOAD_PREFS
41
42 # Run everything that matches qa_*.py and return the final result.
43
44 ok=yes
45 for file in $3/qa_*.py
46 do
47   if ! $file
48   then
49     ok=no
50   fi  
51 done
52
53 if [ $ok = yes ]
54 then
55   exit 0
56 else
57   exit 1
58 fi