diff options
author | Alan Conway <aconway@apache.org> | 2007-12-13 21:23:53 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-12-13 21:23:53 +0000 |
commit | 6d4843497680f91c996a8b8695e4a802ce25c8b7 (patch) | |
tree | dbd0617520e273ed06c5ab95d129c2bdafeea9ad /cpp | |
parent | 0d3521880f6c98ef529b78786cc561a2ae18bb12 (diff) | |
download | qpid-python-6d4843497680f91c996a8b8695e4a802ce25c8b7.tar.gz |
examples/verify: Modified so it can be run in a checkout or in an installation.
checkout: cd cpp/examples/examples; ../verify
installed: cd <installed>/examples; <checkout>/cpp/examples/verify
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@604031 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/examples/verify | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/examples/verify b/cpp/examples/verify index d6d24fb5ce..78b622e400 100755 --- a/cpp/examples/verify +++ b/cpp/examples/verify @@ -3,7 +3,7 @@ # DIR=$PWD -SRC=`dirname $0`/examples +SRC=`dirname $0 | sed 's|^\([^/].*\)|'$PWD'/\1|'`/examples # Utility functions @@ -11,11 +11,13 @@ run() { echo ==== $*; eval "$*"; echo ====; } -waitfor() { until grep -a -l "$2" $1 >/dev/null ; do sleep 1 ; done ; } +waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; } verify() { ex=`basename $PWD` - diff -ac verify.out verify.in || { echo "FAIL: $ex " ; RET=1 ; return 1; } + diff -ac verify.out $SRC/$ex/verify.in || { + echo "FAIL: $ex " ; RET=1 ; return 1; + } } HEX="[a-fA-F0-9]" @@ -60,9 +62,8 @@ request_response() { # Main for ex in direct fanout pub-sub request-response; do func=`echo $ex | tr - _` - cp $SRC/$ex/verify.in $ex echo "Verifing $ex" - ( cd $ex && $func && verify && rm -f verify.in *.out *.wait) + ( cd $ex && $func && verify && rm -f *.out *.wait) done exit $RET |