summaryrefslogtreecommitdiff
path: root/run_tests.sh.in
blob: d32d3653ab6e0c6003f709ef3b02545c4e5e8c8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/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 hand generated swig glue
grswigsrcdir=@abs_top_srcdir@/gnuradio-core/src/lib/swig

# Where to find core's python modules
grpydir=@abs_top_srcdir@/gnuradio-core/src/python

# Construct search path for python modules
PYTHONPATH="$mylibdir:$mysrcdir:$mypydir:$grswigdir:$grswigsrcdir:$grpydir:$PYTHONPATH"
export PYTHONPATH

# Where to find core's master library files and dependencies
gromnidir=@abs_top_builddir@/omnithread
gromnidir=$gromnidir:$gromnidir/.libs
grcoredir=@abs_top_builddir@/gnuradio-core/src/lib
grcoredir=$grcoredir:$grcoredir/.libs
grlibdir=$gromnidir:$grcoredir

# For OS/X
DYLD_LIBRARY_PATH=$grlibdir:$DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH

# For Win32
PATH=$grlibdir:$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 ! @PYTHON@ $file
  then
    ok=no
  fi  
done

if [ $ok = yes ]
then
  exit 0
else
  exit 1
fi