You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2007/12/13 22:24:03 UTC
svn commit: r604031 - /incubator/qpid/trunk/qpid/cpp/examples/verify
Author: aconway
Date: Thu Dec 13 13:23:53 2007
New Revision: 604031
URL: http://svn.apache.org/viewvc?rev=604031&view=rev
Log:
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
Modified:
incubator/qpid/trunk/qpid/cpp/examples/verify
Modified: incubator/qpid/trunk/qpid/cpp/examples/verify
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/verify?rev=604031&r1=604030&r2=604031&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/verify (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/verify Thu Dec 13 13:23:53 2007
@@ -3,7 +3,7 @@
#
DIR=$PWD
-SRC=`dirname $0`/examples
+SRC=`dirname $0 | sed 's|^\([^/].*\)|'$PWD'/\1|'`/examples
# Utility functions
@@ -11,11 +11,13 @@
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 @@
# 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