From 014bfd8e935b09f42440fd5427cdf9db25dfe865 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Mon, 30 Jun 2008 16:35:41 +0000 Subject: This commit is related to QPID-1161. Please refer to the JIRA for complete details. In Summary this contains a simple test kit comprising of perf and soak tests. The focus is on producing a packaged set of tests that can be easily deployed on target environment. For Quick perf report for a particular release, please run perf_report.sh which will show results for 8 common use cases in a tabular format. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@672810 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/perf_report.sh | 109 +++++++++++++++++++++++++++++++++++ qpid/java/testkit/bin/run_pub.sh | 31 ++++++++++ qpid/java/testkit/bin/run_sub.sh | 30 ++++++++++ qpid/java/testkit/bin/setenv.sh | 52 +++++++++++++++++ 4 files changed, 222 insertions(+) create mode 100644 qpid/java/testkit/bin/perf_report.sh create mode 100644 qpid/java/testkit/bin/run_pub.sh create mode 100644 qpid/java/testkit/bin/run_sub.sh create mode 100644 qpid/java/testkit/bin/setenv.sh (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/perf_report.sh b/qpid/java/testkit/bin/perf_report.sh new file mode 100644 index 0000000000..8e25ced685 --- /dev/null +++ b/qpid/java/testkit/bin/perf_report.sh @@ -0,0 +1,109 @@ +#!/bin/sh -xv +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Helper script to set classpath for running Qpid example classes +# NB: You must add the Qpid client and common jars to your CLASSPATH +# before running this script + +MAX_SUB_MEM=1024M +MAX_PUB_MEM=1024M + +. setenv.sh + +waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; } +cleanup() +{ + pids=`ps aux | grep java | grep Perf | awk '{print $2}'` + if [ "$pids" != "" ]; then + kill -3 $pids + kill -9 $pids >/dev/null 2>&1 + fi +} + +# $1 test name +# $2 consumer options +# $3 producer options +run_testcase() +{ + sh run_sub.sh $2 > sub.out & + waitfor sub.out "Warming up" + sh run_pub.sh $3 > pub.out & + waitfor sub.out "Completed the test" + waitfor pub.out "Consumer has completed the test" + sleep 2 #give a grace period to shutdown + print_result $1 +} + +run_sub() +{ + java -cp $CLASSPATH -Xmx$MAX_SUB_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer +} + +run_pub() +{ + java -cp $CLASSPATH -Xmx$MAX_PUB_MEM $@ org.apache.qpid.testkit.perf.PerfProducer +} + +print_result() +{ + prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'` + sys_rate=`cat sub.out | grep "System Throughput" | awk '{print $4}'` + cons_rate=`cat sub.out | grep "Consumer rate" | awk '{print $4}'` + avg_latency=`cat sub.out | grep "Avg Latency" | awk '{print $4}'` + min_latency=`cat sub.out | grep "Min Latency" | awk '{print $4}'` + max_latency=`cat sub.out | grep "Max Latency" | awk '{print $4}'` + + printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11d|%11d|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency + echo "------------------------------------------------------------------------------------------------" +} + +trap cleanup EXIT + +echo "Test report on " `date +%F` +echo "================================================================================================" +echo "|Test |System throuput|Producer rate|Consumer Rate|Avg Latency|Min Latency|Max Latency|" +echo "------------------------------------------------------------------------------------------------" + +# Test 1 Trans Queue +run_testcase "Trans_Queue" "" "-Dwarmup_count=1 -Dmsg_count=10" + +# Test 2 Dura Queue +run_testcase "Dura_Queue" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10" + +# Test 3 Dura Queue Sync +run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true" + +# Test 4 Topic +#run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10" + +# Test 5 Durable Topic +run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10" + +# Test 6 Fanout +run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10" + +# Test 7 Small TX +#run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \ +# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1" + +# Test 8 Large TX +#run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size-10" \ +# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10" + diff --git a/qpid/java/testkit/bin/run_pub.sh b/qpid/java/testkit/bin/run_pub.sh new file mode 100644 index 0000000000..27acd52e47 --- /dev/null +++ b/qpid/java/testkit/bin/run_pub.sh @@ -0,0 +1,31 @@ +#!/bin/sh -xv +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Helper script to set classpath for running Qpid example classes +# NB: You must add the Qpid client and common jars to your CLASSPATH +# before running this script + +. setenv.sh + +MAX_MEM=1024M + +echo "$@" +java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfProducer + diff --git a/qpid/java/testkit/bin/run_sub.sh b/qpid/java/testkit/bin/run_sub.sh new file mode 100644 index 0000000000..35884b9a4a --- /dev/null +++ b/qpid/java/testkit/bin/run_sub.sh @@ -0,0 +1,30 @@ +#!/bin/sh -xv +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Helper script to set classpath for running Qpid example classes +# NB: You must add the Qpid client and common jars to your CLASSPATH +# before running this script + +. setenv.sh + +MAX_MEM=1024M + +java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer + diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh new file mode 100644 index 0000000000..3dba383029 --- /dev/null +++ b/qpid/java/testkit/bin/setenv.sh @@ -0,0 +1,52 @@ +#!/bin/sh -xv +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Helper script to set classpath for running Qpid example classes +# NB: You must add the Qpid client and common jars to your CLASSPATH +# before running this script + +# check for QPID_TEST_HOME +if [ "$QPID_TEST_HOME" = "" ] ; then + echo "ERROR: Please set QPID_TEST_HOME ...." + exit 1 +fi + +# check for JAVA_HOME +if [ "$JAVA_HOME" = "" ] ; then + echo "ERROR: Please set JAVA_HOME ...." + exit 1 +fi + +# VENDOR_LIB path needs to be set +# for Qpid set this to {qpid_checkout}/java/build/lib +VENDOR_LIB="" +if [ "$VENDOR_LIB" = "" ] ; then + echo "ERROR: Please set VENDOR_LIB path in the script ...." + exit 1 +fi + + +[ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes + +CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"` +javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'` + +export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH + -- cgit v1.2.1 From 5f74705f9799b44d6688a59f67c4ae945f5d85d6 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Mon, 7 Jul 2008 03:44:28 +0000 Subject: This is related to QPID-1161. Made minor modifications to the scripts and added a log4j file for the tests. The scripts are now modified to use the JAVA_HOME. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674391 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/perf_report.sh | 33 ++++++++++++--------------------- qpid/java/testkit/bin/run_pub.sh | 7 ++----- qpid/java/testkit/bin/run_sub.sh | 7 +++---- qpid/java/testkit/bin/setenv.sh | 5 ++--- 4 files changed, 19 insertions(+), 33 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/perf_report.sh b/qpid/java/testkit/bin/perf_report.sh index 8e25ced685..cafe4fa07f 100644 --- a/qpid/java/testkit/bin/perf_report.sh +++ b/qpid/java/testkit/bin/perf_report.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -22,8 +22,9 @@ # NB: You must add the Qpid client and common jars to your CLASSPATH # before running this script -MAX_SUB_MEM=1024M -MAX_PUB_MEM=1024M +SUB_MEM=-Xmx1024M +PUB_MEM=-Xmx1024M +LOG_CONFIG=-Dlog4j.configuration="$QPID_TEST_HOME/etc/test.log4j" . setenv.sh @@ -42,25 +43,15 @@ cleanup() # $3 producer options run_testcase() { - sh run_sub.sh $2 > sub.out & + sh run_sub.sh $LOG_CONFIG $SUB_MEM $2 > sub.out & waitfor sub.out "Warming up" - sh run_pub.sh $3 > pub.out & + sh run_pub.sh $LOG_CONFIG $PUB_MEM $3 > pub.out & waitfor sub.out "Completed the test" waitfor pub.out "Consumer has completed the test" sleep 2 #give a grace period to shutdown print_result $1 } -run_sub() -{ - java -cp $CLASSPATH -Xmx$MAX_SUB_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer -} - -run_pub() -{ - java -cp $CLASSPATH -Xmx$MAX_PUB_MEM $@ org.apache.qpid.testkit.perf.PerfProducer -} - print_result() { prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'` @@ -91,19 +82,19 @@ run_testcase "Dura_Queue" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dms run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true" # Test 4 Topic -#run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10" +run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10" # Test 5 Durable Topic -run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10" +#run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10" # Test 6 Fanout run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10" # Test 7 Small TX -#run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \ -# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1" +run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \ + "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1" # Test 8 Large TX -#run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size-10" \ -# "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10" +run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size=10" \ + "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10" diff --git a/qpid/java/testkit/bin/run_pub.sh b/qpid/java/testkit/bin/run_pub.sh index 27acd52e47..a2a67118c5 100644 --- a/qpid/java/testkit/bin/run_pub.sh +++ b/qpid/java/testkit/bin/run_pub.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -24,8 +24,5 @@ . setenv.sh -MAX_MEM=1024M - echo "$@" -java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfProducer - +$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer diff --git a/qpid/java/testkit/bin/run_sub.sh b/qpid/java/testkit/bin/run_sub.sh index 35884b9a4a..232b954c39 100644 --- a/qpid/java/testkit/bin/run_sub.sh +++ b/qpid/java/testkit/bin/run_sub.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -24,7 +24,6 @@ . setenv.sh -MAX_MEM=1024M - -java -cp $CLASSPATH -Xmx$MAX_MEM $@ org.apache.qpid.testkit.perf.PerfConsumer +echo "$@" +$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh index 3dba383029..da039271a3 100644 --- a/qpid/java/testkit/bin/setenv.sh +++ b/qpid/java/testkit/bin/setenv.sh @@ -1,4 +1,4 @@ -#!/bin/sh -xv +#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -36,7 +36,6 @@ fi # VENDOR_LIB path needs to be set # for Qpid set this to {qpid_checkout}/java/build/lib -VENDOR_LIB="" if [ "$VENDOR_LIB" = "" ] ; then echo "ERROR: Please set VENDOR_LIB path in the script ...." exit 1 @@ -46,7 +45,7 @@ fi [ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"` -javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'` +$JAVA_HOME/bin/javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'` export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH -- cgit v1.2.1 From c9e64903737db235846937e1cfec88d3b85d954f Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Mon, 7 Jul 2008 04:03:26 +0000 Subject: This is related to QPID-1161. Added the absolute path to setevn.sh, so that the following scripts can be called from any location. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674392 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/run_pub.sh | 2 +- qpid/java/testkit/bin/run_sub.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/run_pub.sh b/qpid/java/testkit/bin/run_pub.sh index a2a67118c5..2f3150d554 100644 --- a/qpid/java/testkit/bin/run_pub.sh +++ b/qpid/java/testkit/bin/run_pub.sh @@ -22,7 +22,7 @@ # NB: You must add the Qpid client and common jars to your CLASSPATH # before running this script -. setenv.sh +. $QPID_TEST_HOME/bin/setenv.sh echo "$@" $JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer diff --git a/qpid/java/testkit/bin/run_sub.sh b/qpid/java/testkit/bin/run_sub.sh index 232b954c39..6e32451c34 100644 --- a/qpid/java/testkit/bin/run_sub.sh +++ b/qpid/java/testkit/bin/run_sub.sh @@ -22,7 +22,7 @@ # NB: You must add the Qpid client and common jars to your CLASSPATH # before running this script -. setenv.sh +. $QPID_TEST_HOME/bin/setenv.sh echo "$@" $JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer -- cgit v1.2.1 From 9018a2fd309658a4b2fa10078a9efb463060da1b Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Mon, 7 Jul 2008 18:01:37 +0000 Subject: This is related to QPId-1161. Modified the soak tests to print latency samples and throughput rates for every iteration. Added run_soak_client.sh soak_report.sh as an example of how to use soak test and produce a report. Modified other scripts to add comments. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674569 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/perf_report.sh | 6 +- qpid/java/testkit/bin/run_pub.sh | 4 - qpid/java/testkit/bin/run_soak_client.sh | 70 ++++++++++++++ qpid/java/testkit/bin/run_sub.sh | 4 - qpid/java/testkit/bin/setenv.sh | 4 +- qpid/java/testkit/bin/soak_report.sh | 157 +++++++++++++++++++++++++++++++ 6 files changed, 231 insertions(+), 14 deletions(-) create mode 100644 qpid/java/testkit/bin/run_soak_client.sh create mode 100644 qpid/java/testkit/bin/soak_report.sh (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/perf_report.sh b/qpid/java/testkit/bin/perf_report.sh index cafe4fa07f..9e574cad7a 100644 --- a/qpid/java/testkit/bin/perf_report.sh +++ b/qpid/java/testkit/bin/perf_report.sh @@ -18,9 +18,9 @@ # under the License. # -# Helper script to set classpath for running Qpid example classes -# NB: You must add the Qpid client and common jars to your CLASSPATH -# before running this script +# This will run the 8 use cases defined below and produce +# a report in tabular format. Refer to the documentation +# for more details. SUB_MEM=-Xmx1024M PUB_MEM=-Xmx1024M diff --git a/qpid/java/testkit/bin/run_pub.sh b/qpid/java/testkit/bin/run_pub.sh index 2f3150d554..0702a55de9 100644 --- a/qpid/java/testkit/bin/run_pub.sh +++ b/qpid/java/testkit/bin/run_pub.sh @@ -18,10 +18,6 @@ # under the License. # -# Helper script to set classpath for running Qpid example classes -# NB: You must add the Qpid client and common jars to your CLASSPATH -# before running this script - . $QPID_TEST_HOME/bin/setenv.sh echo "$@" diff --git a/qpid/java/testkit/bin/run_soak_client.sh b/qpid/java/testkit/bin/run_soak_client.sh new file mode 100644 index 0000000000..ea1721d988 --- /dev/null +++ b/qpid/java/testkit/bin/run_soak_client.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# This is a sample script for a soak test on +# linux environment. +# This will start n of Producers processors and record their CPU and memory stats. +# Also the Producer out will be saved to a file as well. + +if [ "$JAR_PATH" = "" ] ; then + echo "ERROR: Please set JAR_PATH to point to the Qpid libraries ...." + exit 1 +fi + +#1 PID, $2 freq, $3 count +calc_stats(){ + +for (( i = 0 ; i <= $3; i++ )) + do + cpu=`ps auxw | grep $1 | grep -v 'grep' | awk '{print $3}'` + mem=`pmap $1 | grep total | grep -v 'grep' | awk '{print substr($2,0,length($2)-1)}'` + echo $i","$mem","$cpu + sleep $2 + cpu="0.0" + mem="0" + done + kill -9 $1 +} + +# Num of producer processors to start +num=$1 +# Log frequency in seconds +log_freq=$2 +# Num of iterations +log_iter=$3 + +class_name=$4 +log_file_name=`echo $class_name | cut -d. -f6` + +# The total time for the test is determined by the +# log_freq * log_iter. + +shift 4 +CLASSPATH=`find $JAR_PATH -name '*.jar' | tr '\n' ":"` + +JVM_ARGS="-Xmx1500M $@" +echo "Starting $log_file_name with the following params $JVM_ARGS" + +for (( c = 1 ; c <= $num; c++ )) +do + $JAVA_HOME/bin/java $JVM_ARGS -cp $CLASSPATH $class_name > ${log_file_name}_${c}.log & + pid=`jobs -l %% | awk '{print $2}'` + calc_stats $pid $log_freq $log_iter > ${log_file_name}_process_${c}.log & +done diff --git a/qpid/java/testkit/bin/run_sub.sh b/qpid/java/testkit/bin/run_sub.sh index 6e32451c34..f7e687de38 100644 --- a/qpid/java/testkit/bin/run_sub.sh +++ b/qpid/java/testkit/bin/run_sub.sh @@ -18,10 +18,6 @@ # under the License. # -# Helper script to set classpath for running Qpid example classes -# NB: You must add the Qpid client and common jars to your CLASSPATH -# before running this script - . $QPID_TEST_HOME/bin/setenv.sh echo "$@" diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh index da039271a3..24135e711b 100644 --- a/qpid/java/testkit/bin/setenv.sh +++ b/qpid/java/testkit/bin/setenv.sh @@ -18,9 +18,7 @@ # under the License. # -# Helper script to set classpath for running Qpid example classes -# NB: You must add the Qpid client and common jars to your CLASSPATH -# before running this script +# Compiles the test classes and sets the CLASSPATH # check for QPID_TEST_HOME if [ "$QPID_TEST_HOME" = "" ] ; then diff --git a/qpid/java/testkit/bin/soak_report.sh b/qpid/java/testkit/bin/soak_report.sh new file mode 100644 index 0000000000..9753cf79d8 --- /dev/null +++ b/qpid/java/testkit/bin/soak_report.sh @@ -0,0 +1,157 @@ +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Sample script to run a soak test with MultiThreadedProducer/Consumer. +# You need to provide the log freq and no of iterations +# Ex to run 10 hours and collect 1 second samples +# soak_report.sh 1 36000 + +# This script assumes that a suitable broker instance is started. + +log_freq=$1 +log_iter=$2 + +if [ "$QPID_TEST_HOME" = "" ] ; then + echo "ERROR: Please set QPID_TEST_HOME ...." + exit 1 +fi + +print_rates() +{ + cat $1 | awk '{ + FS = ","; + count = 0; + total_latency = 0; + min_latency = 9223372036854775807; + max_latency = 0; + + total_tp = 0; + min_tp = 50000; + max_tp = 0; + + while ((getline) == 1) + { + total_latency = total_latency + $3 + total_tp = total_tp + $2 + + if ($3 > 0) + { + min_latency = (($3 < min_latency) ? $3 : min_latency); + max_latency = (($3 > max_latency) ? $3 : max_latency); + } + if ($2 > 0) + { + min_tp = (($2 < min_tp) ? $2 : min_tp); + max_tp = (($2 > max_tp) ? $2 : max_tp); + } + + count = count + 1 + } + + print "Avg Latency (ms) : " total_latency/count + print "Max Latency (ms) : " max_latency + print "Min Latency (ms) : " min_latency + + print "" + print "Avg Throughput (msg/sec) : " total_tp/count + print "Max Throughput (msg/sec) : " max_tp + print "Min Throughput (msg/sec) : " min_tp + + print "" + print "Total Iteratons " count + + }' +} + +print_system_stats() +{ + cat $1 | awk '{ + FS = ","; + count = 0; + total_memory = 0; + min_memory = 9223372036854775807; + max_memory = 0; + + total_cp = 0; + min_cp = 50000; + max_cp = 0; + + while ((getline) == 1) + { + total_memory = total_memory + $2 + total_cp = total_cp + $3 + + if ($2 > 0) + { + min_memory = (($2 < min_memory) ? $2 : min_memory); + max_memory = (($2 > max_memory) ? $2 : max_memory); + } + if ($3 > 0) + { + min_cp = (($3 < min_cp) ? $3 : min_cp); + max_cp = (($3 > max_cp) ? $3 : max_cp); + } + + count = count + 1 + } + + print "Avg Memory (MB) : " total_memory/(count*1024) + print "Max Memory (MB) : " max_memory/1024 + print "Min Memory (MB) : " min_memory/1024 + + print "" + print "Avg CPU : " total_cp/count + print "Max CPU : " max_cp + print "Min CPU : " min_cp + + print "" + print "Total Iteratons " count + + }' +} + + +cleanup() +{ + kill -9 `ps aux | grep soak_client | awk '{ print $2 }'` +} + +print_results() +{ + printf "\n======================================================= \n" + print_rates MultiThreadedConsumer_1.log + printf "\nConsumer process stats " + printf "\n----------------------- \n" + print_system_stats MultiThreadedConsumer_process_1.log + printf "\nProducer process stats " + printf "\n----------------------- \n" + print_system_stats MultiThreadedProducer_process_1.log + printf "\n------------------------------------------------------- \n" +} + +trap cleanup EXIT + +# runs a single instance of the MultiThreadedConsumer and MultiThreadedProducer +sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedConsumer +sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedProducer + +sleep $log_iter + +print_results -- cgit v1.2.1 From 6e92b10d74de7c8acd9803e6488c13673ceadd40 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Mon, 7 Jul 2008 20:30:40 +0000 Subject: This is related to QPID-1162 Added a README file to describe what the tests are and how they can be run. Modified to consumers to print the iteration number instead of the message id. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674622 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/soak_report.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/soak_report.sh b/qpid/java/testkit/bin/soak_report.sh index 9753cf79d8..7a17255016 100644 --- a/qpid/java/testkit/bin/soak_report.sh +++ b/qpid/java/testkit/bin/soak_report.sh @@ -130,12 +130,12 @@ print_system_stats() cleanup() { - kill -9 `ps aux | grep soak_client | awk '{ print $2 }'` + kill -9 `ps aux | grep soak | awk '{ print $2 }'` } print_results() { - printf "\n======================================================= \n" + printf "\n======================================================= \n" print_rates MultiThreadedConsumer_1.log printf "\nConsumer process stats " printf "\n----------------------- \n" -- cgit v1.2.1 From d586a03e6d5252fcf08a4542453d8078d3b63594 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 8 Jul 2008 21:50:51 +0000 Subject: This is related to QPID-1161. Added the ability to pass in JVM ARGs. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@674976 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/soak_report.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/soak_report.sh b/qpid/java/testkit/bin/soak_report.sh index 7a17255016..9da8bfa234 100644 --- a/qpid/java/testkit/bin/soak_report.sh +++ b/qpid/java/testkit/bin/soak_report.sh @@ -27,6 +27,8 @@ log_freq=$1 log_iter=$2 +shift 2 +JVM_ARGS=$@ if [ "$QPID_TEST_HOME" = "" ] ; then echo "ERROR: Please set QPID_TEST_HOME ...." @@ -130,7 +132,7 @@ print_system_stats() cleanup() { - kill -9 `ps aux | grep soak | awk '{ print $2 }'` + kill -9 `ps aux | grep java | grep soak | awk '{ print $2 }'` } print_results() @@ -149,9 +151,11 @@ print_results() trap cleanup EXIT # runs a single instance of the MultiThreadedConsumer and MultiThreadedProducer -sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedConsumer -sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedProducer +sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedConsumer $JVM_ARGS +sh $QPID_TEST_HOME/bin/run_soak_client.sh 1 $log_freq $log_iter org.apache.qpid.testkit.soak.MultiThreadedProducer $JVM_ARGS -sleep $log_iter +sleep_time=$((log_freq * log_iter)) +echo "sleep time : " $sleep_time +sleep $((log_freq * log_iter)) print_results -- cgit v1.2.1 From 293f80d50fc7624beb50303120fcdedf1ae5ba0a Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 27 May 2009 15:30:20 +0000 Subject: Removed extra system out statements from PerfProducer.java Added more test cases to the perf report Uncommented and added clientid and subscription props to the testTopicD destination. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@779212 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/perf_report.sh | 45 ++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 7 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/perf_report.sh b/qpid/java/testkit/bin/perf_report.sh index 9e574cad7a..22c839e08c 100644 --- a/qpid/java/testkit/bin/perf_report.sh +++ b/qpid/java/testkit/bin/perf_report.sh @@ -24,7 +24,7 @@ SUB_MEM=-Xmx1024M PUB_MEM=-Xmx1024M -LOG_CONFIG=-Dlog4j.configuration="$QPID_TEST_HOME/etc/test.log4j" +LOG_CONFIG="-Damqj.logging.level=WARN" . setenv.sh @@ -81,20 +81,51 @@ run_testcase "Dura_Queue" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dms # Test 3 Dura Queue Sync run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true" -# Test 4 Topic +# Test 4 Dura Queue Sync Publish and Ack +run_testcase "Dura_SyncPubAck" "-Ddurable=true -Dsync_ack=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_publish=persistent" + +# Test 5 Topic run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10" -# Test 5 Durable Topic -#run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10" +# Test 6 Durable Topic +run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10" -# Test 6 Fanout +# Test 7 Fanout run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10" -# Test 7 Small TX +# Test 8 Small TX run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \ "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1" -# Test 8 Large TX +# Test 9 Large TX run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size=10" \ "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10" +# Test 10 256 MSG +run_testcase "Msg_256b" "" "-Dmsg_size=256 -Dwarmup_count=1 -Dmsg_count=10" + +# Test 11 512 MSG +run_testcase "Msg_512b" "" "-Dmsg_size=512 -Dwarmup_count=1 -Dmsg_count=10" + +# Test 12 2048 MSG +run_testcase "Msg_2048b" "" "-Dmsg_size=2048 -Dwarmup_count=1 -Dmsg_count=10" + +# Test 13 Random size MSG +run_testcase "Random_Msg_Size" "" "-Drandom_msg_size=true -Dwarmup_count=1 -Dmsg_count=10" + +# Test 14 Random size MSG Durable +run_testcase "Rand_Msg_Dura" "-Ddurable=true" "-Ddurable=true -Drandom_msg_size=true -Dwarmup_count=1 -Dmsg_count=10" + +# Test 15 64K MSG +run_testcase "Msg_64K" "-Damqj.tcpNoDelay=true" "-Damqj.tcpNoDelay=true -Dmsg_size=64000 -Dwarmup_count=1 -Dmsg_count=10" + +# Test 16 Durable 64K MSG +run_testcase "Msg_Durable_64K" "-Ddurable=true -Damqj.tcpNoDelay=true" \ + "-Damqj.tcpNoDelay=true -Dmsg_size=64000 -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10" + +# Test 17 500K MSG +run_testcase "Msg_500K" "-Damqj.tcpNoDelay=true" "-Damqj.tcpNoDelay=true -Dmsg_size=500000 -Dwarmup_count=1 -Dmsg_count=10" + +# Test 18 Durable 500K MSG +run_testcase "Msg_Dura_500K" "-Damqj.tcpNoDelay=true -Ddurable=true" \ + "-Damqj.tcpNoDelay=true -Dmsg_size=500000 -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10" -- cgit v1.2.1 From b81852ece48447a8b00e3fd2bafe66b044f2bf80 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 11 Nov 2009 00:13:13 +0000 Subject: Removed the following files as they will be replaced by a generic Sender and Receiver. The bin files and the files under o/a/qpid/teskit/perf are moved under tools. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@834721 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/perf_report.sh | 131 ----------------------------------- qpid/java/testkit/bin/run_pub.sh | 24 ------- qpid/java/testkit/bin/run_sub.sh | 25 ------- qpid/java/testkit/bin/setenv.sh | 49 ------------- 4 files changed, 229 deletions(-) delete mode 100644 qpid/java/testkit/bin/perf_report.sh delete mode 100644 qpid/java/testkit/bin/run_pub.sh delete mode 100644 qpid/java/testkit/bin/run_sub.sh delete mode 100644 qpid/java/testkit/bin/setenv.sh (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/perf_report.sh b/qpid/java/testkit/bin/perf_report.sh deleted file mode 100644 index 22c839e08c..0000000000 --- a/qpid/java/testkit/bin/perf_report.sh +++ /dev/null @@ -1,131 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This will run the 8 use cases defined below and produce -# a report in tabular format. Refer to the documentation -# for more details. - -SUB_MEM=-Xmx1024M -PUB_MEM=-Xmx1024M -LOG_CONFIG="-Damqj.logging.level=WARN" - -. setenv.sh - -waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; } -cleanup() -{ - pids=`ps aux | grep java | grep Perf | awk '{print $2}'` - if [ "$pids" != "" ]; then - kill -3 $pids - kill -9 $pids >/dev/null 2>&1 - fi -} - -# $1 test name -# $2 consumer options -# $3 producer options -run_testcase() -{ - sh run_sub.sh $LOG_CONFIG $SUB_MEM $2 > sub.out & - waitfor sub.out "Warming up" - sh run_pub.sh $LOG_CONFIG $PUB_MEM $3 > pub.out & - waitfor sub.out "Completed the test" - waitfor pub.out "Consumer has completed the test" - sleep 2 #give a grace period to shutdown - print_result $1 -} - -print_result() -{ - prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'` - sys_rate=`cat sub.out | grep "System Throughput" | awk '{print $4}'` - cons_rate=`cat sub.out | grep "Consumer rate" | awk '{print $4}'` - avg_latency=`cat sub.out | grep "Avg Latency" | awk '{print $4}'` - min_latency=`cat sub.out | grep "Min Latency" | awk '{print $4}'` - max_latency=`cat sub.out | grep "Max Latency" | awk '{print $4}'` - - printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11d|%11d|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency - echo "------------------------------------------------------------------------------------------------" -} - -trap cleanup EXIT - -echo "Test report on " `date +%F` -echo "================================================================================================" -echo "|Test |System throuput|Producer rate|Consumer Rate|Avg Latency|Min Latency|Max Latency|" -echo "------------------------------------------------------------------------------------------------" - -# Test 1 Trans Queue -run_testcase "Trans_Queue" "" "-Dwarmup_count=1 -Dmsg_count=10" - -# Test 2 Dura Queue -run_testcase "Dura_Queue" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10" - -# Test 3 Dura Queue Sync -run_testcase "Dura_Queue_Sync" "-Ddurable=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_persistence=true" - -# Test 4 Dura Queue Sync Publish and Ack -run_testcase "Dura_SyncPubAck" "-Ddurable=true -Dsync_ack=true" "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dsync_publish=persistent" - -# Test 5 Topic -run_testcase "Topic" "-DtransDest=transientTopic" "-DtransDest=transientTopic -Dwarmup_count=1 -Dmsg_count=10" - -# Test 6 Durable Topic -run_testcase "Dura_Topic" "-Ddurable=true -DtransDest=durableTopic" "-Ddurable=true -DtransDest=durableTopic -Dwarmup_count=1 -Dmsg_count=10" - -# Test 7 Fanout -run_testcase "Fanout" "-DtransDest=fanoutQueue" "-DtransDest=fanoutQueue -Dwarmup_count=1 -Dmsg_count=10" - -# Test 8 Small TX -run_testcase "Small_Txs_2" "-Ddurable=true -Dtransacted=true -Dtrans_size=1" \ - "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=1" - -# Test 9 Large TX -run_testcase "Large_Txs_1000" "-Ddurable=true -Dtransacted=true -Dtrans_size=10" \ - "-Ddurable=true -Dwarmup_count=1 -Dmsg_count=10 -Dtransacted=true -Dtrans_size=10" - -# Test 10 256 MSG -run_testcase "Msg_256b" "" "-Dmsg_size=256 -Dwarmup_count=1 -Dmsg_count=10" - -# Test 11 512 MSG -run_testcase "Msg_512b" "" "-Dmsg_size=512 -Dwarmup_count=1 -Dmsg_count=10" - -# Test 12 2048 MSG -run_testcase "Msg_2048b" "" "-Dmsg_size=2048 -Dwarmup_count=1 -Dmsg_count=10" - -# Test 13 Random size MSG -run_testcase "Random_Msg_Size" "" "-Drandom_msg_size=true -Dwarmup_count=1 -Dmsg_count=10" - -# Test 14 Random size MSG Durable -run_testcase "Rand_Msg_Dura" "-Ddurable=true" "-Ddurable=true -Drandom_msg_size=true -Dwarmup_count=1 -Dmsg_count=10" - -# Test 15 64K MSG -run_testcase "Msg_64K" "-Damqj.tcpNoDelay=true" "-Damqj.tcpNoDelay=true -Dmsg_size=64000 -Dwarmup_count=1 -Dmsg_count=10" - -# Test 16 Durable 64K MSG -run_testcase "Msg_Durable_64K" "-Ddurable=true -Damqj.tcpNoDelay=true" \ - "-Damqj.tcpNoDelay=true -Dmsg_size=64000 -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10" - -# Test 17 500K MSG -run_testcase "Msg_500K" "-Damqj.tcpNoDelay=true" "-Damqj.tcpNoDelay=true -Dmsg_size=500000 -Dwarmup_count=1 -Dmsg_count=10" - -# Test 18 Durable 500K MSG -run_testcase "Msg_Dura_500K" "-Damqj.tcpNoDelay=true -Ddurable=true" \ - "-Damqj.tcpNoDelay=true -Dmsg_size=500000 -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10" diff --git a/qpid/java/testkit/bin/run_pub.sh b/qpid/java/testkit/bin/run_pub.sh deleted file mode 100644 index 0702a55de9..0000000000 --- a/qpid/java/testkit/bin/run_pub.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -. $QPID_TEST_HOME/bin/setenv.sh - -echo "$@" -$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfProducer diff --git a/qpid/java/testkit/bin/run_sub.sh b/qpid/java/testkit/bin/run_sub.sh deleted file mode 100644 index f7e687de38..0000000000 --- a/qpid/java/testkit/bin/run_sub.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -. $QPID_TEST_HOME/bin/setenv.sh - -echo "$@" -$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.testkit.perf.PerfConsumer - diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh deleted file mode 100644 index 24135e711b..0000000000 --- a/qpid/java/testkit/bin/setenv.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Compiles the test classes and sets the CLASSPATH - -# check for QPID_TEST_HOME -if [ "$QPID_TEST_HOME" = "" ] ; then - echo "ERROR: Please set QPID_TEST_HOME ...." - exit 1 -fi - -# check for JAVA_HOME -if [ "$JAVA_HOME" = "" ] ; then - echo "ERROR: Please set JAVA_HOME ...." - exit 1 -fi - -# VENDOR_LIB path needs to be set -# for Qpid set this to {qpid_checkout}/java/build/lib -if [ "$VENDOR_LIB" = "" ] ; then - echo "ERROR: Please set VENDOR_LIB path in the script ...." - exit 1 -fi - - -[ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes - -CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"` -$JAVA_HOME/bin/javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'` - -export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH - -- cgit v1.2.1 From 2bddecb9a34dd9f541ac9f7fc8e09c0210b2592f Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 18 Nov 2009 19:36:38 +0000 Subject: Added log4j config to the test launcher Added shell script to run testkit.py Removed brokertest.py, instead using the version checked in under python/qpid folder by Alan. The shell scripts and the setup is work in progress, checking in now to help Alan reproduce an issue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@881896 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/qpid-python-testkit | 32 ++++++++++++++++++++++ qpid/java/testkit/bin/setenv.sh | 44 +++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100755 qpid/java/testkit/bin/qpid-python-testkit create mode 100644 qpid/java/testkit/bin/setenv.sh (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/qpid-python-testkit b/qpid/java/testkit/bin/qpid-python-testkit new file mode 100755 index 0000000000..3584e14d88 --- /dev/null +++ b/qpid/java/testkit/bin/qpid-python-testkit @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# This is wrapper script to run the tests defined in testkit.py +# via the python test runner. The defaults are set for a running +# from an svn checkout + +. ./setenv.sh + +export PYTHONPATH=../:$PYTHONPATH + +echo $PYTHONPATH + +$PYTHON_DIR/qpid-python-test -m testkit + diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh new file mode 100644 index 0000000000..c2a0c46d55 --- /dev/null +++ b/qpid/java/testkit/bin/setenv.sh @@ -0,0 +1,44 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Environment for python tests +test -d ../../../python || { echo "WARNING: skipping test, no python directory."; exit 0; } +PYTHON_DIR=../../../python +PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid + +if [ "$QPIDD_EXEC" = "" ] ; then + test -x ../../../cpp/src/qpidd || { echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0; } + QPIDD_EXEC=../../../cpp/src/qpidd +fi + +if [ "$CLUSTER_LIB" = "" ] ; then + test -x ../../../cpp/src/.libs/cluster.so || { echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0; } + CLUSTER_LIB=../../../cpp/src/.libs/cluster.so +fi + +if [ "$QP_CP" = "" ] ; then + QP_CP=`find ../../build/lib/ -name '*.jar' | tr '\n' ':'` +fi + +if [ "$QUTDIR" = "" ] ; then + OUTDIR=../ +fi + + +export PYTHONPATH PYTHON_DIR QPIDD_EXEC CLUSTER_LIB QP_CP OUTDIR -- cgit v1.2.1 From 3de19b33102ca1c5be0cafabb5777d902763d2a5 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Thu, 19 Nov 2009 23:02:07 +0000 Subject: Uncommented the other two tests Modified the scripts to work out the errors. It's now in a reasonable state to start expanding the tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@882346 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/qpid-python-testkit | 6 ++++-- qpid/java/testkit/bin/setenv.sh | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/qpid-python-testkit b/qpid/java/testkit/bin/qpid-python-testkit index 3584e14d88..e1696ff722 100755 --- a/qpid/java/testkit/bin/qpid-python-testkit +++ b/qpid/java/testkit/bin/qpid-python-testkit @@ -26,7 +26,9 @@ export PYTHONPATH=../:$PYTHONPATH -echo $PYTHONPATH +if [ -d $OUTDIR ]; then + rm -rf $OUTDIR +fi -$PYTHON_DIR/qpid-python-test -m testkit +$PYTHON_DIR/qpid-python-test -DOUTDIR=$OUTDIR -m testkit diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh index c2a0c46d55..3ddb6b606f 100644 --- a/qpid/java/testkit/bin/setenv.sh +++ b/qpid/java/testkit/bin/setenv.sh @@ -17,6 +17,13 @@ # under the License. # +abs_path() +{ + D=`dirname "$1"` + B=`basename "$1"` + echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B" +} + # Environment for python tests test -d ../../../python || { echo "WARNING: skipping test, no python directory."; exit 0; } PYTHON_DIR=../../../python @@ -24,20 +31,22 @@ PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid if [ "$QPIDD_EXEC" = "" ] ; then test -x ../../../cpp/src/qpidd || { echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0; } - QPIDD_EXEC=../../../cpp/src/qpidd + QPIDD_EXEC=`abs_path "../../../cpp/src/qpidd"` + #QPIDD_EXEC=/opt/workspace/qpid/trunk/qpid/cpp/src/.libs/lt-qpidd fi if [ "$CLUSTER_LIB" = "" ] ; then test -x ../../../cpp/src/.libs/cluster.so || { echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0; } - CLUSTER_LIB=../../../cpp/src/.libs/cluster.so + CLUSTER_LIB=`abs_path "../../../cpp/src/.libs/cluster.so"` + #CLUSTER_LIB=/opt/workspace/qpid/trunk/qpid/cpp/src/.libs/cluster.so fi if [ "$QP_CP" = "" ] ; then QP_CP=`find ../../build/lib/ -name '*.jar' | tr '\n' ':'` fi -if [ "$QUTDIR" = "" ] ; then - OUTDIR=../ +if [ "$OUTDIR" = "" ] ; then + OUTDIR=`abs_path "../output"` fi -- cgit v1.2.1 From 5f558a1410bd37832ea846857d9d15f1fb017d42 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 1 Dec 2009 00:38:28 +0000 Subject: Modified the script to use absoulte paths when creating the classpath as relative paths could create issues when running the script in automated build environments. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@885633 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/setenv.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh index 3ddb6b606f..0449ecffc7 100644 --- a/qpid/java/testkit/bin/setenv.sh +++ b/qpid/java/testkit/bin/setenv.sh @@ -42,7 +42,8 @@ if [ "$CLUSTER_LIB" = "" ] ; then fi if [ "$QP_CP" = "" ] ; then - QP_CP=`find ../../build/lib/ -name '*.jar' | tr '\n' ':'` + QP_JAR_PATH=`abs_path "../../build/lib/"` + QP_CP=`find $QP_JAR_PATH -name '*.jar' | tr '\n' ':'` fi if [ "$OUTDIR" = "" ] ; then -- cgit v1.2.1 From 5720d502cfe7d570f3f6ac8f0f510709182e70e8 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 9 Dec 2009 16:58:51 +0000 Subject: QPID-2253 - Cluster node shuts down with inconsistent error. Add a missing memberUpdate on the transition to CATCHUP mode. The inconsistent error was caused because the newly updated member did not have its membership updated and so was missing an failover update message that the existing members sent to a new client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@888874 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/qpid-python-testkit | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/qpid-python-testkit b/qpid/java/testkit/bin/qpid-python-testkit index e1696ff722..2c1d015281 100755 --- a/qpid/java/testkit/bin/qpid-python-testkit +++ b/qpid/java/testkit/bin/qpid-python-testkit @@ -25,10 +25,6 @@ . ./setenv.sh export PYTHONPATH=../:$PYTHONPATH - -if [ -d $OUTDIR ]; then - rm -rf $OUTDIR -fi - -$PYTHON_DIR/qpid-python-test -DOUTDIR=$OUTDIR -m testkit +rm -rf $OUTDIR +$PYTHON_DIR/qpid-python-test -DOUTDIR=$OUTDIR -m testkit "$@" -- cgit v1.2.1 From 0da041b0966b6a9a613484de2c7e96b18c771a78 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Wed, 16 Dec 2009 20:25:58 +0000 Subject: This is the first attempt at fixing QPID-2283 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@891416 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/setenv.sh | 46 +++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 11 deletions(-) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh index 0449ecffc7..71bb219dcf 100644 --- a/qpid/java/testkit/bin/setenv.sh +++ b/qpid/java/testkit/bin/setenv.sh @@ -17,6 +17,10 @@ # under the License. # +# If QPIDD_EXEC ..etc is not set, it will first check to see +# if this is run from a qpid svn check out, if not it will look +# for installed rpms. + abs_path() { D=`dirname "$1"` @@ -25,24 +29,45 @@ abs_path() } # Environment for python tests -test -d ../../../python || { echo "WARNING: skipping test, no python directory."; exit 0; } -PYTHON_DIR=../../../python -PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid + +if [ -d ../../../python ] ; then + PYTHON_DIR=../../../python + PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid +elif [ -z `echo $PYTHONPATH | awk '$0 ~ /qpid/'` ]; then + echo "WARNING: skipping test, no qpid python scripts found ."; exit 0; +fi + if [ "$QPIDD_EXEC" = "" ] ; then - test -x ../../../cpp/src/qpidd || { echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0; } - QPIDD_EXEC=`abs_path "../../../cpp/src/qpidd"` - #QPIDD_EXEC=/opt/workspace/qpid/trunk/qpid/cpp/src/.libs/lt-qpidd + if [ -x ../../../cpp/src/qpidd ]; then + QPIDD_EXEC=`abs_path "../../../cpp/src/qpidd"` + elif [ -n "$(which qpidd)" ] ; then + QPIDD_EXEC=$(which qpidd) + else + echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0; + fi fi if [ "$CLUSTER_LIB" = "" ] ; then - test -x ../../../cpp/src/.libs/cluster.so || { echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0; } - CLUSTER_LIB=`abs_path "../../../cpp/src/.libs/cluster.so"` - #CLUSTER_LIB=/opt/workspace/qpid/trunk/qpid/cpp/src/.libs/cluster.so + if [ -x ../../../cpp/src/.libs/cluster.so ]; then + CLUSTER_LIB=`abs_path "../../../cpp/src/.libs/cluster.so"` + elif [ -e /usr/lib64/qpid/daemon/cluster.so ] ; then + CLUSTER_LIB="/usr/lib64/qpid/daemon/cluster.so" + elif [ -e /usr/lib/qpid/daemon/cluster.so ] ; then + CLUSTER_LIB="/usr/lib/qpid/daemon/cluster.so" + else + echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0; + fi fi if [ "$QP_CP" = "" ] ; then - QP_JAR_PATH=`abs_path "../../build/lib/"` + if [ -d ../../build/lib/ ]; then + QP_JAR_PATH=`abs_path "../../build/lib/"` + elif [ -d /usr/share/java/qpid-deps ]; then + QP_JAR_PATH=`abs_path "/usr/share/java"` + else + "WARNING: skipping test, QP_CP not set and the Qpid jars are not present."; exit 0; + fi QP_CP=`find $QP_JAR_PATH -name '*.jar' | tr '\n' ':'` fi @@ -50,5 +75,4 @@ if [ "$OUTDIR" = "" ] ; then OUTDIR=`abs_path "../output"` fi - export PYTHONPATH PYTHON_DIR QPIDD_EXEC CLUSTER_LIB QP_CP OUTDIR -- cgit v1.2.1 From ea85924637502b1a29961cc029c8019b51626ed9 Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Thu, 30 Sep 2010 01:58:23 +0000 Subject: Added the ability to load the store module via installed rpms or using an explicitly specified location. Moved common functionality into base class and helper methods. Added several test cases for the ConcurrencyTest class. (Temporarily removed the FailoverTests.) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1002928 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/setenv.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh index 71bb219dcf..e6a726eef1 100644 --- a/qpid/java/testkit/bin/setenv.sh +++ b/qpid/java/testkit/bin/setenv.sh @@ -60,6 +60,16 @@ if [ "$CLUSTER_LIB" = "" ] ; then fi fi +if [ "$STORE_LIB" = "" ] ; then + if [ -e /usr/lib64/qpid/daemon/msgstore.so ] ; then + CLUSTER_LIB="/usr/lib64/qpid/daemon/msgstore.so" + elif [ -e /usr/lib/qpid/daemon/msgstore.so ] ; then + CLUSTER_LIB="/usr/lib/qpid/daemon/msgstore.so" + else + echo "WARNING: skipping test, STORE_LIB not set and msgstore.so not found."; exit 0; + fi +fi + if [ "$QP_CP" = "" ] ; then if [ -d ../../build/lib/ ]; then QP_JAR_PATH=`abs_path "../../build/lib/"` -- cgit v1.2.1 From 5637dc8057652693c9dcc59f1ecefe2e63163b7e Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Mon, 8 Nov 2010 16:59:33 +0000 Subject: Moved the testkit scripts under the tools module. I will be moving the source also into the tools module in subsequent commit. The goal is to have all tools in a single location. The perftest script and the testkit script are very good tools for release testing. These scripts will also be used in downstream packages for the same purpose. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1032640 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/java/testkit/bin/qpid-python-testkit | 30 ----------- qpid/java/testkit/bin/setenv.sh | 88 ------------------------------- 2 files changed, 118 deletions(-) delete mode 100755 qpid/java/testkit/bin/qpid-python-testkit delete mode 100644 qpid/java/testkit/bin/setenv.sh (limited to 'qpid/java/testkit/bin') diff --git a/qpid/java/testkit/bin/qpid-python-testkit b/qpid/java/testkit/bin/qpid-python-testkit deleted file mode 100755 index 2c1d015281..0000000000 --- a/qpid/java/testkit/bin/qpid-python-testkit +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This is wrapper script to run the tests defined in testkit.py -# via the python test runner. The defaults are set for a running -# from an svn checkout - -. ./setenv.sh - -export PYTHONPATH=../:$PYTHONPATH -rm -rf $OUTDIR -$PYTHON_DIR/qpid-python-test -DOUTDIR=$OUTDIR -m testkit "$@" - diff --git a/qpid/java/testkit/bin/setenv.sh b/qpid/java/testkit/bin/setenv.sh deleted file mode 100644 index e6a726eef1..0000000000 --- a/qpid/java/testkit/bin/setenv.sh +++ /dev/null @@ -1,88 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# If QPIDD_EXEC ..etc is not set, it will first check to see -# if this is run from a qpid svn check out, if not it will look -# for installed rpms. - -abs_path() -{ - D=`dirname "$1"` - B=`basename "$1"` - echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B" -} - -# Environment for python tests - -if [ -d ../../../python ] ; then - PYTHON_DIR=../../../python - PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid -elif [ -z `echo $PYTHONPATH | awk '$0 ~ /qpid/'` ]; then - echo "WARNING: skipping test, no qpid python scripts found ."; exit 0; -fi - - -if [ "$QPIDD_EXEC" = "" ] ; then - if [ -x ../../../cpp/src/qpidd ]; then - QPIDD_EXEC=`abs_path "../../../cpp/src/qpidd"` - elif [ -n "$(which qpidd)" ] ; then - QPIDD_EXEC=$(which qpidd) - else - echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0; - fi -fi - -if [ "$CLUSTER_LIB" = "" ] ; then - if [ -x ../../../cpp/src/.libs/cluster.so ]; then - CLUSTER_LIB=`abs_path "../../../cpp/src/.libs/cluster.so"` - elif [ -e /usr/lib64/qpid/daemon/cluster.so ] ; then - CLUSTER_LIB="/usr/lib64/qpid/daemon/cluster.so" - elif [ -e /usr/lib/qpid/daemon/cluster.so ] ; then - CLUSTER_LIB="/usr/lib/qpid/daemon/cluster.so" - else - echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0; - fi -fi - -if [ "$STORE_LIB" = "" ] ; then - if [ -e /usr/lib64/qpid/daemon/msgstore.so ] ; then - CLUSTER_LIB="/usr/lib64/qpid/daemon/msgstore.so" - elif [ -e /usr/lib/qpid/daemon/msgstore.so ] ; then - CLUSTER_LIB="/usr/lib/qpid/daemon/msgstore.so" - else - echo "WARNING: skipping test, STORE_LIB not set and msgstore.so not found."; exit 0; - fi -fi - -if [ "$QP_CP" = "" ] ; then - if [ -d ../../build/lib/ ]; then - QP_JAR_PATH=`abs_path "../../build/lib/"` - elif [ -d /usr/share/java/qpid-deps ]; then - QP_JAR_PATH=`abs_path "/usr/share/java"` - else - "WARNING: skipping test, QP_CP not set and the Qpid jars are not present."; exit 0; - fi - QP_CP=`find $QP_JAR_PATH -name '*.jar' | tr '\n' ':'` -fi - -if [ "$OUTDIR" = "" ] ; then - OUTDIR=`abs_path "../output"` -fi - -export PYTHONPATH PYTHON_DIR QPIDD_EXEC CLUSTER_LIB QP_CP OUTDIR -- cgit v1.2.1