You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2009/09/28 23:17:33 UTC

svn commit: r819738 - /qpid/trunk/qpid/cpp/src/tests/

Author: aconway
Date: Mon Sep 28 21:17:31 2009
New Revision: 819738

URL: http://svn.apache.org/viewvc?rev=819738&view=rev
Log:
Fix python tests to work in VPATH builds and for make distcheck.

Added:
    qpid/trunk/qpid/cpp/src/tests/python_env.sh   (contents, props changed)
      - copied, changed from r819605, qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests
Modified:
    qpid/trunk/qpid/cpp/src/tests/Makefile.am
    qpid/trunk/qpid/cpp/src/tests/clustered_replication_test
    qpid/trunk/qpid/cpp/src/tests/federated_cluster_test
    qpid/trunk/qpid/cpp/src/tests/federated_topic_test
    qpid/trunk/qpid/cpp/src/tests/python_tests
    qpid/trunk/qpid/cpp/src/tests/reliable_replication_test
    qpid/trunk/qpid/cpp/src/tests/replication_test
    qpid/trunk/qpid/cpp/src/tests/run_acl_tests
    qpid/trunk/qpid/cpp/src/tests/run_cli_tests
    qpid/trunk/qpid/cpp/src/tests/run_cluster_tests
    qpid/trunk/qpid/cpp/src/tests/run_federation_tests
    qpid/trunk/qpid/cpp/src/tests/run_header_test
    qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests
    qpid/trunk/qpid/cpp/src/tests/run_ring_queue_test

Modified: qpid/trunk/qpid/cpp/src/tests/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/Makefile.am?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/tests/Makefile.am Mon Sep 28 21:17:31 2009
@@ -22,6 +22,7 @@
 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_SOURCES=qpid_stream.cpp
 qpid_stream_LDADD=$(lib_client) 
 
-
 TESTS_ENVIRONMENT = \
     VALGRIND=$(VALGRIND) \
     srcdir=$(srcdir) \
@@ -311,7 +311,7 @@
   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 @@
  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
+

Modified: qpid/trunk/qpid/cpp/src/tests/clustered_replication_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/clustered_replication_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/clustered_replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/clustered_replication_test Mon Sep 28 21:17:31 2009
@@ -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 @@
     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 @@
     #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 @@
     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

Modified: qpid/trunk/qpid/cpp/src/tests/federated_cluster_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federated_cluster_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federated_cluster_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/federated_cluster_test Mon Sep 28 21:17:31 2009
@@ -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 @@
 }
 
 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() {

Modified: qpid/trunk/qpid/cpp/src/tests/federated_topic_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federated_topic_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federated_topic_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/federated_topic_test Mon Sep 28 21:17:31 2009
@@ -43,7 +43,7 @@
 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 @@
     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
 }

Copied: qpid/trunk/qpid/cpp/src/tests/python_env.sh (from r819605, qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/python_env.sh?p2=qpid/trunk/qpid/cpp/src/tests/python_env.sh&p1=qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests&r1=819605&r2=819738&rev=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/python_env.sh Mon Sep 28 21:17:31 2009
@@ -1,5 +1,3 @@
-#!/bin/bash
-
 #
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
@@ -8,9 +6,9 @@
 # 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
@@ -19,4 +17,10 @@
 # under the License.
 #
 
-./run_cluster_tests long_cluster_tests
+# 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
+

Modified: qpid/trunk/qpid/cpp/src/tests/python_tests
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/python_tests?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/python_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/python_tests Mon Sep 28 21:17:31 2009
@@ -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

Modified: qpid/trunk/qpid/cpp/src/tests/reliable_replication_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/reliable_replication_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/reliable_replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/reliable_replication_test Mon Sep 28 21:17:31 2009
@@ -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 @@
     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 @@
 
 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"
 }
 

Modified: qpid/trunk/qpid/cpp/src/tests/replication_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/replication_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/replication_test Mon Sep 28 21:17:31 2009
@@ -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 @@
     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_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_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_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 @@
     ../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 @@
     ../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

Modified: qpid/trunk/qpid/cpp/src/tests/run_acl_tests
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_acl_tests?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_acl_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_acl_tests Mon Sep 28 21:17:31 2009
@@ -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 @@
     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

Modified: qpid/trunk/qpid/cpp/src/tests/run_cli_tests
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_cli_tests?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_cli_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_cli_tests Mon Sep 28 21:17:31 2009
@@ -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 @@
     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 

Modified: qpid/trunk/qpid/cpp/src/tests/run_cluster_tests
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_cluster_tests?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_cluster_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_cluster_tests Mon Sep 28 21:17:31 2009
@@ -26,12 +26,12 @@
 	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
 

Modified: qpid/trunk/qpid/cpp/src/tests/run_federation_tests
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_federation_tests?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_federation_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_federation_tests Mon Sep 28 21:17:31 2009
@@ -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 @@
     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 

Modified: qpid/trunk/qpid/cpp/src/tests/run_header_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_header_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_header_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_header_test Mon Sep 28 21:17:31 2009
@@ -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

Modified: qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_long_cluster_tests Mon Sep 28 21:17:31 2009
@@ -19,4 +19,5 @@
 # under the License.
 #
 
-./run_cluster_tests long_cluster_tests
+srcdir=`dirname $0`
+$srcdir/run_cluster_tests long_cluster_tests

Modified: qpid/trunk/qpid/cpp/src/tests/run_ring_queue_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_ring_queue_test?rev=819738&r1=819737&r2=819738&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_ring_queue_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_ring_queue_test Mon Sep 28 21:17:31 2009
@@ -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`



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org