diff options
| author | Alan Conway <aconway@apache.org> | 2008-02-08 17:02:55 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-02-08 17:02:55 +0000 |
| commit | 976fe912718629067295f89258ce60db6b425770 (patch) | |
| tree | 0866925966d5fbfd5dbf9d7affcd68c4e4054c8e /qpid/bin | |
| parent | 56be271a9b61a7baec92b81ba84b9e9e2c51255d (diff) | |
| download | qpid-python-976fe912718629067295f89258ce60db6b425770.tar.gz | |
Added verify scripts to run mixed python/cpp examples.
bin/verify_all runs all examples.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@619941 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/bin')
| -rwxr-xr-x | qpid/bin/verify | 15 | ||||
| -rwxr-xr-x | qpid/bin/verify_all | 12 |
2 files changed, 20 insertions, 7 deletions
diff --git a/qpid/bin/verify b/qpid/bin/verify index fc86c3d896..f35db898cf 100755 --- a/qpid/bin/verify +++ b/qpid/bin/verify @@ -38,17 +38,18 @@ background() { outputs() { wait 2> /dev/null # Wait for all backgroud processes to complete + rm -f $script.out for f in "$@"; do - { echo "==== $f"; eval "cat $f"; } >> verify.out || fail + { echo "==== $f"; eval "cat $f"; } >> $script.out || fail done } verify() { FAIL= - dir=$1 + if [ -d $1 ]; then dir=$1; script=verify; + else dir=`dirname $1`; script=`basename $1`; fi cd $dir || return 1 - rm -f *.out - { source ./verify && diff -ac verify.out verify.in ; } || fail + { source ./$script && diff -ac $script.out $script.in ; } || fail test -z "$FAIL" && rm -f *.out return $FAIL } @@ -67,8 +68,8 @@ if [ -n "$QPIDD" ] ; then trap "$QPIDD -q" EXIT fi -for dir in "$@"; do - echo -n "$dir : " - if ( verify $dir; ) then echo "PASS"; else echo "FAIL"; RET=1; fi +for example in "$@"; do + echo -n "$example : " + if ( verify $example; ) then echo "PASS"; else echo "FAIL"; RET=1; fi done exit $RET diff --git a/qpid/bin/verify_all b/qpid/bin/verify_all new file mode 100755 index 0000000000..6be460c701 --- /dev/null +++ b/qpid/bin/verify_all @@ -0,0 +1,12 @@ +#!/bin/sh +# Find example verify scripts and run them. +# Usage: verify_all search-dir + +if [ `basename $1` = examples ]; then exdirs=$1 +else exdirs=`find $1 -name examples -a -type d`; fi +scripts=`find $exdirs -name verify -o -name verify_cpp_python -o -name verify_cpp_java` +verify=`dirname $0`/verify +for s in $scripts; do $verify $s; done + + + |
