summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-09-28 21:17:31 +0000
committerAlan Conway <aconway@apache.org>2009-09-28 21:17:31 +0000
commit576b578d61d0d31082587bf77a25a59da2ba738f (patch)
treee1b49a066a2263794e43276dfa4b97bb5d9112b5 /cpp/src
parent4b8343c7a9461a5d80858a020cdabde684d722f7 (diff)
downloadqpid-python-576b578d61d0d31082587bf77a25a59da2ba738f.tar.gz
Fix python tests to work in VPATH builds and for make distcheck.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@819738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/tests/Makefile.am60
-rwxr-xr-xcpp/src/tests/clustered_replication_test17
-rwxr-xr-xcpp/src/tests/federated_cluster_test19
-rwxr-xr-xcpp/src/tests/federated_topic_test17
-rw-r--r--cpp/src/tests/python_env.sh26
-rwxr-xr-xcpp/src/tests/python_tests10
-rwxr-xr-xcpp/src/tests/reliable_replication_test14
-rwxr-xr-xcpp/src/tests/replication_test43
-rwxr-xr-xcpp/src/tests/run_acl_tests4
-rwxr-xr-xcpp/src/tests/run_cli_tests6
-rwxr-xr-xcpp/src/tests/run_cluster_tests6
-rwxr-xr-xcpp/src/tests/run_federation_tests4
-rwxr-xr-xcpp/src/tests/run_header_test2
-rwxr-xr-xcpp/src/tests/run_long_cluster_tests3
-rwxr-xr-xcpp/src/tests/run_ring_queue_test5
15 files changed, 135 insertions, 101 deletions
diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am
index 967daadb97..6dae8aba69 100644
--- a/cpp/src/tests/Makefile.am
+++ b/cpp/src/tests/Makefile.am
@@ -22,6 +22,7 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src
PUBLIC_INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include # Use public API only
abs_builddir=@abs_builddir@
+abs_srcdir=@abs_srcdir@
extra_libs =
lib_client = $(abs_builddir)/../libqpidclient.la
lib_common = $(abs_builddir)/../libqpidcommon.la
@@ -275,7 +276,6 @@ qpid_stream_INCLUDES=$(PUBLIC_INCLUDES)
qpid_stream_SOURCES=qpid_stream.cpp
qpid_stream_LDADD=$(lib_client)
-
TESTS_ENVIRONMENT = \
VALGRIND=$(VALGRIND) \
srcdir=$(srcdir) \
@@ -311,7 +311,7 @@ EXTRA_DIST += \
TxMocks.h \
replication_test \
run_perftest \
- ring_queue_test \
+ ring_queue_test \
run_ring_queue_test
check_LTLIBRARIES += libdlclose_noop.la
@@ -327,30 +327,44 @@ LONG_TESTS+=start_broker fanout_perftest shared_perftest multiq_perftest topic_p
run_failover_soak reliable_replication_test \
federated_cluster_test_with_node_failure
-EXTRA_DIST+=fanout_perftest shared_perftest multiq_perftest topic_perftest run_failover_soak reliable_replication_test \
- federated_cluster_test_with_node_failure \
- tests.sln \
- client_test.vcproj \
- consume.vcproj \
- echotest.vcproj \
- header_test.vcproj \
- latencytest.vcproj \
- perftest.vcproj \
- publish.vcproj \
- receiver.vcproj \
- sender.vcproj \
- shlibtest.vcproj \
- topic_listener.vcproj \
- topic_publisher.vcproj \
- txjob.vcproj \
- txshift.vcproj \
- txtest.vcproj \
- unit_test.vcproj
+EXTRA_DIST+= \
+ python_env.sh \
+ fanout_perftest \
+ shared_perftest \
+ multiq_perftest \
+ topic_perftest \
+ run_failover_soak \
+ reliable_replication_test \
+ federated_cluster_test_with_node_failure \
+ tests.sln \
+ client_test.vcproj \
+ consume.vcproj \
+ echotest.vcproj \
+ header_test.vcproj \
+ latencytest.vcproj \
+ perftest.vcproj \
+ publish.vcproj \
+ receiver.vcproj \
+ sender.vcproj \
+ shlibtest.vcproj \
+ topic_listener.vcproj \
+ topic_publisher.vcproj \
+ txjob.vcproj \
+ txshift.vcproj \
+ txtest.vcproj \
+ unit_test.vcproj
check-long:
$(MAKE) check TESTS="$(LONG_TESTS)" VALGRIND=
check: python_prep
-python_prep :
- $(MAKE) -C $(abspath $(srcdir)/../../../python) install PREFIX=$(abs_builddir)/../../temp-install PYTHON_LIB=$(abs_builddir)/../../temp-install AMQP_SPEC_DIR=$(abspath $(srcdir)/../../../specs)
+PYTHON_SRC_DIR=$(abs_srcdir)/../../../python
+PYTHON_BLD_DIR=$(abs_builddir)/python
+AMQP_SPEC_DIR=$(abs_srcdir)/../../../specs
+
+python_prep:
+ if test -d $(PYTHON_SRC_DIR) -a -d $(AMQP_SPEC_DIR); \
+ then $(MAKE) -C $(PYTHON_SRC_DIR) install PREFIX=$(PYTHON_BLD_DIR) PYTHON_LIB=$(PYTHON_BLD_DIR) EXEC_PREFIX=$(PYTHON_BLD_DIR)/commands AMQP_SPEC_DIR=$(AMQP_SPEC_DIR); \
+ else echo "WARNING: python client not built, missing one of $(PYTHON_SRC_DIR) $(AMQP_SPEC_DIR)"; fi
+
diff --git a/cpp/src/tests/clustered_replication_test b/cpp/src/tests/clustered_replication_test
index e3bc9cb65e..4713f4b3f9 100755
--- a/cpp/src/tests/clustered_replication_test
+++ b/cpp/src/tests/clustered_replication_test
@@ -22,8 +22,7 @@
# Test reliability of the replication feature in the face of link
# failures:
srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python/temp
-export PYTHONPATH=$PYTHON_DIR
+. $srcdir/python_env.sh
trap stop_brokers INT EXIT
@@ -55,7 +54,7 @@ stop_brokers() {
fi
}
-if test -d ${PYTHON_DIR}; then
+if test -d $PYTHON_DIR; then
id -nG | grep '\<ais\>' >/dev/null || \
NOGROUP="You are not a member of the ais group."
ps -u root | grep 'aisexec\|corosync' >/dev/null || \
@@ -89,8 +88,8 @@ EOF
#start first node of primary cluster and set up test queue
echo Starting primary cluster
PRIMARY1=$(with_ais_group ../qpidd $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.1.tmp) || fail "Could not start node"
- $PYTHON_DIR/qpid-config -a "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2
- $PYTHON_DIR/qpid-config -a "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1
#send 10 messages, consume 5 of them
for i in `seq 1 10`; do echo Message$i; done | ./sender --port $PRIMARY1
@@ -105,10 +104,10 @@ EOF
DR1=$(with_ais_group ../qpidd $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.1.tmp)
DR2=$(with_ais_group ../qpidd $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.2.tmp)
- $PYTHON_DIR/qpid-config -a "localhost:$DR1" add queue test-queue
- $PYTHON_DIR/qpid-config -a "localhost:$DR1" add queue control-queue
- $PYTHON_DIR/qpid-config -a "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE
- $PYTHON_DIR/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue test-queue
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue control-queue
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE
+ $PYTHON_COMMANDS/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE
#send more messages to primary
for i in `seq 11 20`; do echo Message$i; done | ./sender --port $PRIMARY1 --send-eos 1
diff --git a/cpp/src/tests/federated_cluster_test b/cpp/src/tests/federated_cluster_test
index d4b917535e..7f2442451e 100755
--- a/cpp/src/tests/federated_cluster_test
+++ b/cpp/src/tests/federated_cluster_test
@@ -22,7 +22,7 @@
# Test reliability of the replication feature in the face of link
# failures:
srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python/temp
+. $srcdir/python_env.sh
trap stop_brokers EXIT
@@ -61,22 +61,21 @@ start_brokers() {
}
setup() {
- export PYTHONPATH=$PYTHON_DIR
#create exchange on both cluster and single broker
- $PYTHON_DIR/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange
- $PYTHON_DIR/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange
#create dynamic routes for test exchange
- $PYTHON_DIR/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange
- $PYTHON_DIR/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange
+ $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange
+ $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange
#create test queue on cluster and bind it to the test exchange
- $PYTHON_DIR/qpid-config -a "localhost:$NODE_1" add queue test-queue
- $PYTHON_DIR/qpid-config -a "localhost:$NODE_1" bind test-exchange test-queue to-cluster
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" add queue test-queue
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" bind test-exchange test-queue to-cluster
#create test queue on single broker and bind it to the test exchange
- $PYTHON_DIR/qpid-config -a "localhost:$BROKER_A" add queue test-queue
- $PYTHON_DIR/qpid-config -a "localhost:$BROKER_A" bind test-exchange test-queue from-cluster
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue test-queue
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" bind test-exchange test-queue from-cluster
}
run_test_pull_to_cluster_two_consumers() {
diff --git a/cpp/src/tests/federated_topic_test b/cpp/src/tests/federated_topic_test
index 3fcd89602c..dbe9a85e95 100755
--- a/cpp/src/tests/federated_topic_test
+++ b/cpp/src/tests/federated_topic_test
@@ -43,7 +43,7 @@ while getopts "s:m:b:" opt ; do
done
MY_DIR=$(dirname $(which $0))
-PYTHON_DIR=${MY_DIR}/../../../python/temp
+. $MY_DIR/python_env.sh
trap stop_brokers EXIT
@@ -87,29 +87,28 @@ setup_routes() {
BROKER_A="localhost:$PORT_A"
BROKER_B="localhost:$PORT_B"
BROKER_C="localhost:$PORT_C"
- export PYTHONPATH=$PYTHON_DIR
if (($VERBOSE)); then
echo "Establishing routes for topic..."
fi
- $PYTHON_DIR/commands/qpid-route route add $BROKER_B $BROKER_A amq.topic topic_control B B
- $PYTHON_DIR/commands/qpid-route route add $BROKER_C $BROKER_B amq.topic topic_control C C
+ $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_A amq.topic topic_control B B
+ $PYTHON_COMMANDS/qpid-route route add $BROKER_C $BROKER_B amq.topic topic_control C C
if (($VERBOSE)); then
echo "linked A->B->C"
fi
- $PYTHON_DIR/commands/qpid-route route add $BROKER_B $BROKER_C amq.topic topic_control B B
- $PYTHON_DIR/commands/qpid-route route add $BROKER_A $BROKER_B amq.topic topic_control A A
+ $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_C amq.topic topic_control B B
+ $PYTHON_COMMANDS/qpid-route route add $BROKER_A $BROKER_B amq.topic topic_control A A
if (($VERBOSE)); then
echo "linked C->B->A"
echo "Establishing routes for response queue..."
fi
- $PYTHON_DIR/commands/qpid-route route add $BROKER_B $BROKER_C amq.direct response B B
- $PYTHON_DIR/commands/qpid-route route add $BROKER_A $BROKER_B amq.direct response A A
+ $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_C amq.direct response B B
+ $PYTHON_COMMANDS/qpid-route route add $BROKER_A $BROKER_B amq.direct response A A
if (($VERBOSE)); then
echo "linked C->B->A"
for b in $BROKER_A $BROKER_B $BROKER_C; do
echo "Routes for $b"
- $PYTHON_DIR/commands/qpid-route route list $b
+ $PYTHON_COMMANDS/qpid-route route list $b
done
fi
}
diff --git a/cpp/src/tests/python_env.sh b/cpp/src/tests/python_env.sh
new file mode 100644
index 0000000000..f5dca97a56
--- /dev/null
+++ b/cpp/src/tests/python_env.sh
@@ -0,0 +1,26 @@
+#
+# 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 `basename $0`, no python directory."; exit 0; }
+PYTHON_DIR=$PWD/python
+PYTHON_COMMANDS=$PYTHON_DIR/commands
+PYTHONPATH=$PYTHON_DIR
+export PYTHONPATH PYTHON_DIR
+
diff --git a/cpp/src/tests/python_tests b/cpp/src/tests/python_tests
index aa13f329ed..e2077ef7dc 100755
--- a/cpp/src/tests/python_tests
+++ b/cpp/src/tests/python_tests
@@ -20,14 +20,10 @@
#
# Run the python tests.
+. `dirname $0`/python_env.sh
QPID_PORT=${QPID_PORT:-5672}
PYTHON_TESTS=${PYTHON_TESTS:-$*}
-QPID_PYTHON_DIR=${QPID_PYTHON_DIR:-`dirname $0`/../../../python/temp}
FAILING=${FAILING:-/dev/null}
-if test -d $QPID_PYTHON_DIR; then
- cd $QPID_PYTHON_DIR
- ./qpid-python-test -b localhost:$QPID_PORT -I $FAILING $PYTHON_TESTS || { echo "FAIL python tests"; exit 1; }
-else
- echo "WARNING: No python tests. $QPID_PYTHON_DIR not found."
-fi
+cd $PYTHON_DIR
+python commands/qpid-python-test -b localhost:$QPID_PORT -I $FAILING $PYTHON_TESTS || exit 1
diff --git a/cpp/src/tests/reliable_replication_test b/cpp/src/tests/reliable_replication_test
index 11cdc5be66..db06259f0c 100755
--- a/cpp/src/tests/reliable_replication_test
+++ b/cpp/src/tests/reliable_replication_test
@@ -22,7 +22,7 @@
# Test reliability of the replication feature in the face of link
# failures:
MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python/temp
+. ${MY_DIR}/python_env.sh
trap stop_brokers EXIT
@@ -53,12 +53,12 @@ setup() {
echo "Testing replication from port $BROKER_A to port $BROKER_B"
export PYTHONPATH=$PYTHON_DIR
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
- $PYTHON_DIR/commands/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+ $PYTHON_COMMANDS/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
#create test queue (only replicate enqueues for this test):
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 1
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-a
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 1
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-a
}
send() {
@@ -72,10 +72,10 @@ receive() {
bounce_link() {
echo "Destroying link..."
- $PYTHON_DIR/commands/qpid-route link del "localhost:$BROKER_B" "localhost:$BROKER_A"
+ $PYTHON_COMMANDS/qpid-route link del "localhost:$BROKER_B" "localhost:$BROKER_A"
echo "Link destroyed; recreating route..."
sleep 2
- $PYTHON_DIR/commands/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+ $PYTHON_COMMANDS/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
echo "Route re-established"
}
diff --git a/cpp/src/tests/replication_test b/cpp/src/tests/replication_test
index 8b3022b260..000b4591da 100755
--- a/cpp/src/tests/replication_test
+++ b/cpp/src/tests/replication_test
@@ -21,7 +21,8 @@
# Run a test of the replication feature
MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
+. `dirname $0`/python_env.sh
+
trap stop_brokers INT TERM QUIT
stop_brokers() {
@@ -47,21 +48,21 @@ if test -d ${PYTHON_DIR} && test -f ../.libs/replicating_listener.so && test -f
export PYTHONPATH
echo "Running replication test between localhost:$BROKER_A and localhost:$BROKER_B"
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
- $PYTHON_DIR/commands/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+ $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
#create test queues
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 2
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-b --generate-queue-events 2
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-c --generate-queue-events 1
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 2
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 1
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 2
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-b --generate-queue-events 2
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-c --generate-queue-events 1
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 2
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 1
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-a
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-b
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-c
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-a
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-b
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-c
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e
#queue-d deliberately not declared on DR; this error case should be handled
#publish and consume from test queues on broker A:
@@ -125,13 +126,13 @@ if test -d ${PYTHON_DIR} && test -f ../.libs/replicating_listener.so && test -f
../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module ../.libs/replication_exchange.so --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd.port
BROKER_B=`cat qpidd.port`
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
- $PYTHON_DIR/commands/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+ $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 2
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 1
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-d
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 2
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 1
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-d
i=1
while [ $i -le 10 ]; do
@@ -153,9 +154,9 @@ if test -d ${PYTHON_DIR} && test -f ../.libs/replicating_listener.so && test -f
../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module ../.libs/replication_exchange.so --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd.port
BROKER_B=`cat qpidd.port`
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
- $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
- $PYTHON_DIR/commands/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e
+ $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+ $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
# now send another 15
i=11
while [ $i -le 15 ]; do
diff --git a/cpp/src/tests/run_acl_tests b/cpp/src/tests/run_acl_tests
index aef2879cbe..c67e2d421d 100755
--- a/cpp/src/tests/run_acl_tests
+++ b/cpp/src/tests/run_acl_tests
@@ -20,7 +20,7 @@
#
# Run the acl tests. $srcdir is set by the Makefile.
-PYTHON_DIR=$srcdir/../../../python/temp
+. `dirname $0`/python_env.sh
DATA_DIR=`pwd`/data_dir
trap stop_brokers INT TERM QUIT
@@ -55,7 +55,7 @@ if test -d ${PYTHON_DIR} ; then
echo "Running acl tests using brokers on ports $LOCAL_PORT"
PYTHONPATH=$PYTHON_DIR:$srcdir
export PYTHONPATH
- $PYTHON_DIR/qpid-python-test -b localhost:$LOCAL_PORT -m acl || EXITCODE=1
+ $PYTHON_COMMANDS/qpid-python-test -b localhost:$LOCAL_PORT -m acl || EXITCODE=1
stop_brokers || EXITCODE=1
test_loading_acl_from_absolute_path || EXITCODE=1
rm -rf $DATA_DIR
diff --git a/cpp/src/tests/run_cli_tests b/cpp/src/tests/run_cli_tests
index e526c561f2..bb9605410c 100755
--- a/cpp/src/tests/run_cli_tests
+++ b/cpp/src/tests/run_cli_tests
@@ -21,8 +21,8 @@
# Run the cli-utility tests.
MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python/temp
-CLI_DIR=${PYTHON_DIR}
+. `dirname $0`/python_env.sh
+CLI_DIR=$PYTHON_COMMANDS
trap stop_brokers INT TERM QUIT
@@ -43,7 +43,7 @@ if test -d ${PYTHON_DIR} ; then
echo "Running CLI tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
PYTHONPATH=${PYTHON_DIR}:${MY_DIR}
export PYTHONPATH
- ${PYTHON_DIR}/qpid-python-test -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $@
+ $PYTHON_COMMANDS/qpid-python-test -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $@
RETCODE=$?
stop_brokers
if test x$RETCODE != x0; then
diff --git a/cpp/src/tests/run_cluster_tests b/cpp/src/tests/run_cluster_tests
index c8fbe14c21..c89e657243 100755
--- a/cpp/src/tests/run_cluster_tests
+++ b/cpp/src/tests/run_cluster_tests
@@ -26,12 +26,12 @@ if [ -z ${top_builddir} -o -z ${srcdir} ]; then
top_builddir=${srcdir}/../../
fi
TEST_DIR=${top_builddir}/src/tests
-PYTHON_DIR=${srcdir}/../../../python/temp
+. `dirname $0`/python_env.sh
if test -z $1; then
- CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests cluster_tests.ShortTests.\*"
+ CLUSTER_TEST="$PYTHON_COMMANDS/qpid-python-test -m cluster_tests cluster_tests.ShortTests.\*"
else
- CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests cluster_tests.LongTests.\*"
+ CLUSTER_TEST="$PYTHON_COMMANDS/qpid-python-test -m cluster_tests cluster_tests.LongTests.\*"
echo "Running $1..."
fi
diff --git a/cpp/src/tests/run_federation_tests b/cpp/src/tests/run_federation_tests
index a003967322..3fe4bccb13 100755
--- a/cpp/src/tests/run_federation_tests
+++ b/cpp/src/tests/run_federation_tests
@@ -21,7 +21,7 @@
# Run the federation tests.
MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python/temp
+. `dirname $0`/python_env.sh
trap stop_brokers INT TERM QUIT
@@ -42,7 +42,7 @@ if test -d ${PYTHON_DIR} ; then
echo "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
PYTHONPATH=${PYTHON_DIR}:${MY_DIR}
export PYTHONPATH
- ${PYTHON_DIR}/qpid-python-test -m federation -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT $@
+ $PYTHON_COMMANDS/qpid-python-test -m federation -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT $@
RETCODE=$?
stop_brokers
if test x$RETCODE != x0; then
diff --git a/cpp/src/tests/run_header_test b/cpp/src/tests/run_header_test
index 729f300c53..1b5a3963db 100755
--- a/cpp/src/tests/run_header_test
+++ b/cpp/src/tests/run_header_test
@@ -24,7 +24,7 @@
# in both directions
srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python/temp
+. `dirname $0`/python_env.sh
test -f qpidd.port && QPID_PORT=`cat qpidd.port`
if test -d ${PYTHON_DIR} ; then
diff --git a/cpp/src/tests/run_long_cluster_tests b/cpp/src/tests/run_long_cluster_tests
index bc1ae8a0c1..cb9c6b219b 100755
--- a/cpp/src/tests/run_long_cluster_tests
+++ b/cpp/src/tests/run_long_cluster_tests
@@ -19,4 +19,5 @@
# under the License.
#
-./run_cluster_tests long_cluster_tests
+srcdir=`dirname $0`
+$srcdir/run_cluster_tests long_cluster_tests
diff --git a/cpp/src/tests/run_ring_queue_test b/cpp/src/tests/run_ring_queue_test
index ad19a39d0f..9cd3775de1 100755
--- a/cpp/src/tests/run_ring_queue_test
+++ b/cpp/src/tests/run_ring_queue_test
@@ -22,9 +22,8 @@
#setup path to find qpid-config and sender/receiver test progs
srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python/temp
-export PYTHONPATH=$PYTHON_DIR
-export PATH=./:$PYTHON_DIR/commands:$PATH
+. `dirname $0`/python_env.sh
+export PATH=$PWD:$srcdir:$PYTHON_COMMANDS:$PATH
#set port to connect to via env var
test -s qpidd.port && QPID_PORT=`cat qpidd.port`