summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-12-13 21:23:53 +0000
committerAlan Conway <aconway@apache.org>2007-12-13 21:23:53 +0000
commitabbf60fa108b4349daa50ce3e80546a76e72b348 (patch)
treea3c8483daaa38420c7196af7228aa159731ea645 /qpid/cpp/examples
parent9cfba2389f899b5b290d7bfdf8430cdcced279e5 (diff)
downloadqpid-python-abbf60fa108b4349daa50ce3e80546a76e72b348.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@604031 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples')
-rwxr-xr-xqpid/cpp/examples/verify11
1 files changed, 6 insertions, 5 deletions
diff --git a/qpid/cpp/examples/verify b/qpid/cpp/examples/verify
index d6d24fb5ce..78b622e400 100755
--- a/qpid/cpp/examples/verify
+++ b/qpid/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