You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/05/04 18:45:55 UTC

svn commit: r653253 - in /incubator/qpid/trunk/qpid/java/client/example: bin/ src/main/java/org/apache/qpid/example/jmsexample/fanout/ src/main/java/org/apache/qpid/example/jmsexample/pubsub/ src/main/java/org/apache/qpid/example/jmsexample/requestResp...

Author: gsim
Date: Sun May  4 09:45:54 2008
New Revision: 653253

URL: http://svn.apache.org/viewvc?rev=653253&view=rev
Log:
Update and cleanup scripts for automated 0-10 example testing.


Modified:
    incubator/qpid/trunk/qpid/java/client/example/bin/verify_all
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java
    incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in

Modified: incubator/qpid/trunk/qpid/java/client/example/bin/verify_all
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/bin/verify_all?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/bin/verify_all (original)
+++ incubator/qpid/trunk/qpid/java/client/example/bin/verify_all Sun May  4 09:45:54 2008
@@ -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
+

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python Sun May  4 09:45:54 2008
@@ -10,4 +10,4 @@
 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"

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/fanout/verify_java_python.in Sun May  4 09:45:54 2008
@@ -14,7 +14,7 @@
 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 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 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

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python Sun May  4 09:45:54 2008
@@ -7,4 +7,4 @@
 
 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"

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/pubsub/verify_java_python.in Sun May  4 09:45:54 2008
@@ -31,7 +31,7 @@
 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

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify Sun May  4 09:45:54 2008
@@ -11,6 +11,5 @@
 
 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"

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_cpp Sun May  4 09:45:54 2008
@@ -7,6 +7,6 @@
 
 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"

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python Sun May  4 09:45:54 2008
@@ -7,6 +7,5 @@
 
 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"

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_java_python.in Sun May  4 09:45:54 2008
@@ -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,

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java Sun May  4 09:45:54 2008
@@ -8,4 +8,4 @@
 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"

Modified: incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in?rev=653253&r1=653252&r2=653253&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in (original)
+++ incubator/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/requestResponse/verify_python_java.in Sun May  4 09:45:54 2008
@@ -13,6 +13,6 @@
 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 ...)