7f755f00f07e14cbb4cf012058330a0b4103f44d
[debian/gnuradio] / gr-audio-osx / src / run_tests.in
1 #!/bin/sh
2
3 # All this strange PYTHONPATH manipulation is required to run our
4 # tests using our just built shared library and swig-generated python
5 # code prior to installation.
6
7 # build tree == src tree unless you're doing a VPATH build.  
8 # If you don't know what a VPATH build is, you're not doing one.  Relax...
9
10 prefix=@prefix@
11 exec_prefix=@exec_prefix@
12
13 # Where to look in the build tree for our shared library
14 libbld=@abs_top_builddir@/gr-audio-osx/src
15 # Where to look in the src tree for swig generated python code
16 libsrc=@abs_top_srcdir@/gr-audio-osx/src
17 # Where to look in the src tree for hand written python code
18 py=@abs_top_srcdir@/gr-audio-osx/src
19
20 # Where to look for GNU Radio python modules in current build tree
21 # FIXME this is wrong on a distcheck.  We really need to ask gnuradio-core
22 # where it put its python files.
23 grpythonbld=@abs_top_srcdir@/gnuradio-core/src/python
24 grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig
25 grpythonbld=$grpythonbld:@abs_top_builddir@/gnuradio-core/src/lib/swig/.libs
26
27 PYTHONPATH="$grpythonbld:$libbld:$libbld/.libs:$libsrc:$py:$PYTHONPATH"
28 export PYTHONPATH
29
30 # For OS/X
31 DYLD_LIBRARY_PATH="@abs_top_builddir@/gnuradio-core/src/lib/.libs"
32 export DYLD_LIBRARY_PATH
33
34 #
35 # This is the simple part...
36 # Run everything that matches qa_*.py and return the final result.
37 #
38
39 ok=yes
40 for file in @srcdir@/qa_*.py
41 do
42   if ! $file
43   then
44     ok=no
45   fi  
46 done
47
48 if [ $ok = yes ]
49 then
50   exit 0
51 else
52   exit 1
53 fi