#!/bin/sh # Verify all C++/python example combinations. # verify=`dirname $0`/verify topdir=$1 exclude_regexp=$2 qpidd=$topdir/cpp/src/qpidd python=$topdir/python trap "$qpidd -q" exit export QPID_PORT=`$qpidd -dp0 --data-dir "" --auth no` export PYTHON_EXAMPLES=$python/examples export PYTHONPATH=$python:$PYTHONPATH export AMQP_SPEC=$topdir/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