diff options
| author | Gordon Sim <gsim@apache.org> | 2008-05-04 16:45:54 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-05-04 16:45:54 +0000 |
| commit | 13f417586d6d192b88785cb12b8b1b70647d65de (patch) | |
| tree | e957e429ab17459dcad2261a9c8d5dc28ccc519c | |
| parent | cb802d7d136c12bf0baf041679cf09fad34fd30c (diff) | |
| download | qpid-python-13f417586d6d192b88785cb12b8b1b70647d65de.tar.gz | |
Update and cleanup scripts for automated 0-10 example testing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@653253 13f79535-47bb-0310-9956-ffa450edef68
11 files changed, 35 insertions, 30 deletions
diff --git a/java/client/example/bin/verify_all b/java/client/example/bin/verify_all index 5b90f708eb..0191ebd80e 100644 --- a/java/client/example/bin/verify_all +++ b/java/client/example/bin/verify_all @@ -1,34 +1,41 @@ #!/bin/sh -# This script assumes QPID_SRC_HOME is set . - -if [[ "x$QPID_SRC_HOME" = "x" ]]; then - echo "WARNING >>> QPID_SRC_HOME needs to be set " - exit -fi +export QPID_SRC_HOME=$(cd "$(dirname $0)/../../../.."; pwd) export CPP=$QPID_SRC_HOME/cpp/examples/examples export PYTHON=$QPID_SRC_HOME/python/examples export JAVA=$QPID_SRC_HOME/java/client/example/src/main/java/org/apache/qpid/example/jmsexample +export AMQP_SPEC=$QPID_SRC_HOME/specs/amqp.0-10.xml +export PYTHONPATH=$QPID_SRC_HOME/python/ + +trap cleanup EXIT + run_broker(){ - $QPID_SRC_HOME/cpp/src/qpidd -d --no-data-dir + $QPID_SRC_HOME/cpp/src/qpidd -d --no-data-dir --auth no } stop_broker(){ $QPID_SRC_HOME/cpp/src/qpidd -q } +cleanup(){ + if [ -e /tmp/qpidd.5672.pid ]; then + stop_broker + fi + find $CPP -name '*.out' | xargs rm -f + find $PYTHON -name '*.out' | xargs rm -f + find $JAVA -name '*.out' | xargs rm -f +} + QPID_LIBS=`find $QPID_SRC_HOME/java/build/lib -name '*.jar' | tr '\n' ":"` export CLASSPATH=$QPID_LIBS:$CLASSPATH verify=$QPID_SRC_HOME/cpp/examples/verify -for dir in $(find $JAVA/ -maxdepth 1 -type d -not -name '*.svn') +for script in $(find $JAVA -name 'verify*' -not -path '*.svn' -not -name '*.*') do - for script in $(find $dir -maxdepth 1 -type f -name 'verify*' -not -name '*.*') - do - run_broker - $verify $script - stop_broker - done + run_broker + $verify $script + stop_broker done + diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python index 6ac91f88c8..b57cb4af38 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python @@ -10,4 +10,4 @@ background "Subscribed" $py/fanout_consumer.py background "Subscribed" $py/fanout_consumer.py background "Subscribed" $py/fanout_consumer.py clients fanout_producer_java -outputs ./fanout_producer_java.out "$py/fanout_consumer.py.out | remove_uuid64" "$py/fanout_consumer.pyX.out | remove_uuid64" "$py/fanout_consumer.pyXX.out | remove_uuid64" +outputs ./fanout_producer_java.out "$py/fanout_consumer.py.out | remove_uuid" "$py/fanout_consumer.pyX.out | remove_uuid" "$py/fanout_consumer.pyXX.out | remove_uuid" diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in index 4b5678105f..2e96f03318 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in @@ -14,7 +14,7 @@ Producer: Sending message: 9 Producer: Sending message: 10 Producer: Closing connection Producer: Closing JNDI context -==== fanout_consumer.py.out | remove_uuid64 +==== fanout_consumer.py.out | remove_uuid Messages queue: Subscribed to queue Response: Message 1 @@ -29,7 +29,7 @@ Response: Message 9 Response: Message 10 Response: That's all, folks! No more messages! -==== fanout_consumer.pyX.out | remove_uuid64 +==== fanout_consumer.pyX.out | remove_uuid Messages queue: Subscribed to queue Response: Message 1 @@ -44,7 +44,7 @@ Response: Message 9 Response: Message 10 Response: That's all, folks! No more messages! -==== fanout_consumer.pyXX.out | remove_uuid64 +==== fanout_consumer.pyXX.out | remove_uuid Messages queue: Subscribed to queue Response: Message 1 diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python index a6969c3951..a8daf6ba30 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python @@ -7,4 +7,4 @@ java -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.pubsub.Publisher background "Queues created" $py/topic_subscriber.py clients topic_publisher_java -outputs ./topic_publisher_java.out "$py/topic_subscriber.py.out | remove_uuid64 | sort" +outputs ./topic_publisher_java.out "$py/topic_subscriber.py.out | remove_uuid | sort" diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in index eeb79a0a38..1a8962515d 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in @@ -31,7 +31,7 @@ Publisher: Sending message 5 Publisher: Sending message 6 Publisher: Closing connection Publisher: Closing JNDI context -==== topic_subscriber.py.out | remove_uuid64 | sort +==== topic_subscriber.py.out | remove_uuid | sort message 1 message 1 message 1 diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify index 576b871dc4..b3b0735d53 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify @@ -11,6 +11,5 @@ java -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.requestResponse.Server background "can receive messages" server_java clients client_java -PID=`ps -aux | grep 'qpid-client-incubating-M3.jar'|grep -v 'grep'|awk '{ print $2 }'` -kill -9 $PID +kill %% outputs "client_java.out | remove_uuid" "server_java.out | remove_uuid" diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp index 3e730fde5e..27510dc3f7 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp @@ -7,6 +7,6 @@ java -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.requestResponse.Server background "can receive messages" server_java clients $cpp/client -PID=`ps -aux | grep 'qpid-client-incubating-M3.jar'|grep -v 'grep'|awk '{ print $2 }'` -kill -9 $PID +#ps -ao pid,cmd | awk '/qpid-client-incubating-M3.jar/{ print $1 }' | xargs -r kill +kill %% outputs "$cpp/client.out | remove_uuid" "server_java.out | remove_uuid" diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python index c773ca481d..01bec87cab 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python @@ -7,6 +7,5 @@ java -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.requestResponse.Server background "can receive messages" server_java clients $py/client.py -PID=`ps -aux | grep 'qpid-client-incubating-M3.jar'|grep -v 'grep'|awk '{ print $2 }'` -kill -9 $PID -outputs "$py/client.py.out | remove_uuid64" "server_java.out | remove_uuid" +kill %% +outputs "$py/client.py.out | remove_uuid" "server_java.out | remove_uuid" diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in index d7ff7df160..25285eb2a3 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in @@ -1,4 +1,4 @@ -==== client.py.out | remove_uuid64 +==== client.py.out | remove_uuid Request: Twas brilling, and the slithy toves Request: Did gyre and gimble in the wabe. Request: All mimsy were the borogroves, diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java index 3c0a3985ae..92a33f4a1e 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java @@ -8,4 +8,4 @@ java -cp "$CLASSPATH" org.apache.qpid.example.jmsexample.requestResponse.Client background "Request server running" $py/server.py clients client_java kill %% -outputs "client_java.out | remove_uuid" "$py/server.py.out | remove_uuid64" +outputs "client_java.out | remove_uuid" "$py/server.py.out | remove_uuid" diff --git a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in index 4da22b62cc..6e53ca3281 100644 --- a/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in +++ b/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in @@ -13,6 +13,6 @@ Client: Request Content= And the mome raths outgrabe. Client: Response Content= AND THE MOME RATHS OUTGRABE. Client: Closing connection Client: Closing JNDI context -==== server.py.out | remove_uuid64 +==== server.py.out | remove_uuid Request server running - run your client now. (Times out after 100 seconds ...) |
