summaryrefslogtreecommitdiff
path: root/run_tests.sh.in
blob: 4e7d69e47d0299eec8c09e7a491e7ce5f7a04036 (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
#!/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

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

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

# For OS/X
DYLD_LIBRARY_PATH=$grlibdir
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 ! $file
  then
    ok=no
  fi  
done

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