summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples/verify_all
blob: 9db2214903afb7f7e6d5214d6c35398c9b65c88f (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
#!/bin/sh
# Verify all C++/python example combinations.
#

verify=`dirname $0`/verify
topsrcdir=$1
qpidd=$2
exclude_regexp=$3

python=$topsrcdir/python

trap "$qpidd -q" exit
export QPID_PORT=`$qpidd -dp0 --data-dir "" --auth no` || { echo "Can't run qpidd" ; exit 1; }
export PYTHON_EXAMPLES=$python/examples
export PYTHONPATH=$python:$PYTHONPATH
export AMQP_SPEC=$topsrcdir/specs/amqp.0-10.xml

test -d $PYTHON_EXAMPLES || echo "Warning: not verifying python examples, $PYTHON_EXAMPLES not found"
find="find examples"
test -d $PYTHON_EXAMPLES && find="$find $PYTHON_EXAMPLES"
find="$find -name verify"
test -d $PYTHON_EXAMPLES && \
    find="$find -o -name verify_cpp_python -o -name verify_python_cpp"
all_examples=`$find`

if test -z "$exclude_regexp"; then
    run_examples=$all_examples
else
    for f in $all_examples; do
	{ cat $f | grep $exclude_regexp > /dev/null ; } || run_examples="$run_examples $f"
    done
fi
$verify $run_examples