qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r886259 - in /qpid/trunk/qpid/cpp/src: ./ tests/
Date Wed, 02 Dec 2009 19:00:24 GMT
Author: aconway
Date: Wed Dec  2 19:00:11 2009
New Revision: 886259

URL: http://svn.apache.org/viewvc?rev=886259&view=rev
Log:
Run cluster tests under cmake.

Various other test fixes.
 - Env vars to abstract different library location under cmake/automake.
 - More consistent use of env vars test_env.sh in test scripts.
 - Fix replication/replicating_exchange mismatch.
 - Add --no-module-dir to prevent accidentally loading modules.

Added:
    qpid/trunk/qpid/cpp/src/tests/cluster.cmake
Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/cluster.cmake
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
    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/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_failover_soak
    qpid/trunk/qpid/cpp/src/tests/run_federation_tests
    qpid/trunk/qpid/cpp/src/tests/ssl_test
    qpid/trunk/qpid/cpp/src/tests/start_cluster
    qpid/trunk/qpid/cpp/src/tests/start_cluster_hosts
    qpid/trunk/qpid/cpp/src/tests/stop_broker
    qpid/trunk/qpid/cpp/src/tests/stop_cluster
    qpid/trunk/qpid/cpp/src/tests/test_env.sh.in
    qpid/trunk/qpid/cpp/src/tests/test_watchdog
    qpid/trunk/qpid/cpp/src/tests/testlib.py

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Wed Dec  2 19:00:11 2009
@@ -888,18 +888,18 @@
 # can process the messages from a replication queue (populated on the
 # source system by the replicating listener plugin above) and take the
 # corresponding action on the local queues
-add_library (replicating_exchange MODULE
+add_library (replication_exchange MODULE
              qpid/replication/constants.h
              qpid/replication/ReplicationExchange.cpp
              qpid/replication/ReplicationExchange.h
             )
-target_link_libraries (replicating_exchange qpidbroker)
-set_target_properties (replicating_exchange PROPERTIES PREFIX "")
+target_link_libraries (replication_exchange qpidbroker)
+set_target_properties (replication_exchange PROPERTIES PREFIX "")
 if (CMAKE_COMPILER_IS_GNUCXX)
-  set_target_properties(replicating_exchange PROPERTIES
+  set_target_properties(replication_exchange PROPERTIES
                         LINK_FLAGS -Wl,--no-undefined)
 endif (CMAKE_COMPILER_IS_GNUCXX)
-install (TARGETS replicating_exchange
+install (TARGETS replication_exchange
          DESTINATION ${QPIDD_MODULE_DIR}
          COMPONENT ${QPID_COMPONENT_BROKER})
 

Modified: qpid/trunk/qpid/cpp/src/cluster.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/cluster.cmake?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/cluster.cmake (original)
+++ qpid/trunk/qpid/cpp/src/cluster.cmake Wed Dec  2 19:00:11 2009
@@ -134,9 +134,12 @@
 
   add_library (cluster MODULE ${cluster_SOURCES})
   target_link_libraries (cluster ${LIBCPG} ${CMAN_LIB} qpidbroker qpidclient ${Boost_FILESYSTEM_LIBRARY})
-
-  set_target_properties (cluster PROPERTIES
-                         PREFIX "")
+  set_target_properties (cluster PROPERTIES PREFIX "")
+  
+  # Create a second shared library for linking with test executables,
+  # cmake will not allow a module to be linked with an executable.
+  add_library (cluster_shared SHARED ${cluster_SOURCES})
+  target_link_libraries (cluster_shared ${LIBCPG} ${CMAN_LIB} qpidbroker qpidclient ${Boost_FILESYSTEM_LIBRARY})
 
   if (CMAKE_COMPILER_IS_GNUCXX)
     set_target_properties(cluster PROPERTIES

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Wed Dec  2 19:00:11 2009
@@ -169,7 +169,9 @@
 
 add_library (shlibtest MODULE shlibtest.cpp)
 
-# include(cluster.cmake)
+if (BUILD_CLUSTER)
+  include (cluster.cmake)
+endif (BUILD_CLUSTER)
 
 # FIXME aconway 2009-11-30: enable SSL
 #if SSL
@@ -229,13 +231,6 @@
 #header_test_SOURCES=header_test.cpp TestOptions.h ConnectionOptions.h
 remember_location(header_test)
 
-if (BUILD_CLUSTER)
-  add_executable (failover_soak failover_soak.cpp ForkedBroker.cpp ${platform_test_additions})
-  target_link_libraries (failover_soak qpidclient)
-  #failover_soak_SOURCES=failover_soak.cpp  ForkedBroker.h
-  remember_location(failover_soak)
-endif (BUILD_CLUSTER)
-
 add_executable (declare_queues declare_queues.cpp ${platform_test_additions})
 target_link_libraries (declare_queues qpidclient)
 remember_location(declare_queues)
@@ -294,6 +289,9 @@
 endif (BUILD_ACL)
 endif (PYTHON_EXECUTABLE)
 
+add_library(test_store MODULE test_store.cpp)
+set_target_properties (test_store PROPERTIES PREFIX "")
+
 #EXTRA_DIST +=								\
 #  run_test vg_check							\
 #  run-unit-tests start_broker python_tests stop_broker 			\

Added: qpid/trunk/qpid/cpp/src/tests/cluster.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/cluster.cmake?rev=886259&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/cluster.cmake (added)
+++ qpid/trunk/qpid/cpp/src/tests/cluster.cmake Wed Dec  2 19:00:11 2009
@@ -0,0 +1,86 @@
+#
+# 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.
+#
+
+#
+# Cluster tests cmake fragment, to be included in CMakeLists.txt
+# 
+
+add_executable (failover_soak failover_soak.cpp ForkedBroker.cpp ${platform_test_additions})
+target_link_libraries (failover_soak qpidclient)
+remember_location(failover_soak)
+
+set (cluster_test_SOURCES
+  cluster_test
+  unit_test
+  ClusterFixture
+  ForkedBroker
+  PartialFailure
+  ClusterFailover
+  InitialStatusMap
+  StoreStatus
+  )
+add_executable (cluster_test cluster_test ${cluster_test_SOURCES}  ${platform_test_additions})
+target_link_libraries (cluster_test ${qpid_test_boost_libs} qpidclient qpidbroker cluster_shared)
+remember_location(cluster_test)
+
+add_test (cluster_test ${CMAKE_CURRENT_SOURCE_DIR}/run_cluster_test${test_script_suffix})
+add_test (cluster_tests ${CMAKE_CURRENT_SOURCE_DIR}/run_cluster_tests${test_script_suffix})
+add_test (cluster_read_credit ${CMAKE_CURRENT_SOURCE_DIR}/cluster_read_credit${test_script_suffix})
+add_test (cluster_test_watchdog ${CMAKE_CURRENT_SOURCE_DIR}/test_watchdog${test_script_suffix})
+add_test (federated_cluster_test ${CMAKE_CURRENT_SOURCE_DIR}/federated_cluster_test${test_script_suffix})
+add_test (clustered_replication_test ${CMAKE_CURRENT_SOURCE_DIR}/clustered_replication_test${test_script_suffix})
+
+# FIXME aconway 2009-12-01: translate to cmake
+# # Clean up after cluster_test and start_cluster
+# CLEANFILES += cluster_test.acl cluster.ports
+
+# EXTRA_DIST +=					\
+# 	ais_check				\
+# 	run_cluster_test			\
+# 	cluster_read_credit			\
+# 	test_watchdog				\
+# 	start_cluster				\
+# 	stop_cluster				\
+# 	restart_cluster				\
+# 	cluster_python_tests			\
+# 	cluster_python_tests_failing.txt	\
+# 	federated_cluster_test			\
+# 	clustered_replication_test		\
+# 	run_cluster_tests			\
+# 	run_long_cluster_tests			\
+# 	testlib.py				\
+# 	cluster_tests.py			\
+# 	long_cluster_tests.py			\
+# 	cluster_tests.fail
+
+# LONG_TESTS +=					\
+# 	run_long_cluster_tests			\
+# 	start_cluster				\
+# 	cluster_python_tests			\
+# 	stop_cluster
+
+# qpidtest_PROGRAMS += cluster_test
+
+# cluster_test_SOURCES =				\
+
+# cluster_test_LDADD=$(lib_client) $(lib_broker) ../cluster.la -lboost_unit_test_framework
+
+# qpidtest_SCRIPTS += run_cluster_tests cluster_tests.py run_long_cluster_tests long_cluster_tests.py
testlib.py cluster_tests.fail
+
+# endif

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/clustered_replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/clustered_replication_test Wed Dec  2 19:00:11 2009
@@ -32,19 +32,19 @@
 
 stop_brokers() {
     if [[ $PRIMARY1 ]] ; then
-        ../qpidd -q --port $PRIMARY1
+        $QPIDD_EXEC --no-module-dir -q --port $PRIMARY1
         unset PRIMARY1
     fi      
     if [[ $PRIMARY2 ]] ; then
-        ../qpidd -q --port $PRIMARY2
+        $QPIDD_EXEC --no-module-dir -q --port $PRIMARY2
         unset PRIMARY2
     fi      
     if [[ $DR1 ]] ; then
-        ../qpidd -q --port $DR1
+        $QPIDD_EXEC --no-module-dir -q --port $DR1
         unset DR1
     fi
     if [[ $DR2 ]] ; then
-        ../qpidd -q --port $DR2
+        $QPIDD_EXEC --no-module-dir -q --port $DR2
         unset DR2
     fi
 }
@@ -57,14 +57,14 @@
     DR_CLUSTER=DR_$(hostname)_$$
 
     GENERAL_OPTS="--auth no --no-module-dir --no-data-dir --daemon --port 0 --log-to-stderr
false"
-    PRIMARY_OPTS="--load-module $QPID_MODULE_DIR/replicating_listener.so --create-replication-queue
true --replication-queue REPLICATION_QUEUE --load-module $QPID_MODULE_DIR/cluster.so --cluster-name
$PRIMARY_CLUSTER"
-    DR_OPTS="--load-module $QPID_MODULE_DIR/replication_exchange.so --load-module $QPID_MODULE_DIR/cluster.so
--cluster-name $DR_CLUSTER"
+    PRIMARY_OPTS="--load-module $REPLICATING_LISTENER_LIB --create-replication-queue true
--replication-queue REPLICATION_QUEUE --load-module $CLUSTER_LIB --cluster-name $PRIMARY_CLUSTER"
+    DR_OPTS="--load-module $REPLICATION_EXCHANGE_LIB --load-module $CLUSTER_LIB --cluster-name
$DR_CLUSTER"
 
     rm -f repl*.tmp #cleanup any files left from previous run
 
     #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"
+    PRIMARY1=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.1.tmp)
|| fail "Could not start PRIMARY1"
     $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
 
@@ -74,12 +74,12 @@
 
     #add new node to primary cluster, testing correct transfer of state:
     echo Adding node to primary cluster
-    PRIMARY2=$(with_ais_group ../qpidd $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.2.tmp)
+    PRIMARY2=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.2.tmp)
|| fail "Could not start PRIMARY2 "
 
     #start DR cluster, set up test queue there and establish replication bridge
     echo Starting DR cluster
-    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)
+    DR1=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.1.tmp)
|| fail "Could not start DR1"
+    DR2=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.2.tmp)
|| fail "Could not start DR2"
 
     $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue test-queue
     $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue control-queue

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federated_cluster_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/federated_cluster_test Wed Dec  2 19:00:11 2009
@@ -33,15 +33,15 @@
 
 stop_brokers() {
     if [[ $BROKER_A ]] ; then
-        ../qpidd -q --port $BROKER_A
+        ../qpidd --no-module-dir -q --port $BROKER_A
         unset BROKER_A
     fi      
     if [[ $NODE_1 ]] ; then
-        ../qpidd -q --port $NODE_1
+        ../qpidd --no-module-dir -q --port $NODE_1
         unset NODE_1
     fi
     if [[ $NODE_2 ]] ; then
-        ../qpidd -q --port $NODE_2
+        ../qpidd --no-module-dir -q --port $NODE_2
         unset NODE_2
     fi
     if [ -f cluster.ports ]; then
@@ -51,13 +51,14 @@
 
 start_brokers() {
     #start single node...
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --log-enable info+
> fed.port.tmp
-    BROKER_A=`cat fed.port.tmp`
+    BROKER_A=`../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --log-enable
info+` || fail "BROKER_A failed to start"
 
     #...and start cluster
     $srcdir/start_cluster 2 || fail "Could not start cluster"
     NODE_1=$(head -1 cluster.ports)
     NODE_2=$(tail -1 cluster.ports)
+    test -n "$NODE_1" || fail "NODE_1 failed to start"
+    test -n "$NODE_2" || fail "NODE_2 failed to start"
 }
 
 setup() {

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federated_topic_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/federated_topic_test Wed Dec  2 19:00:11 2009
@@ -62,7 +62,7 @@
 
 stop_brokers() {
     for p in $PORT_A $PORT_B $PORT_C; do
-        ${MY_DIR}/../qpidd -q --port $p
+        $QPIDD_EXEC --no-module-dir -q --port $p
     done
 }
 

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/reliable_replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/reliable_replication_test Wed Dec  2 19:00:11 2009
@@ -28,28 +28,23 @@
 
 stop_brokers() {
     if [[ $BROKER_A ]] ; then
-        ../qpidd -q --port $BROKER_A
+        $QPIDD_EXEC --no-module-dir -q --port $BROKER_A
         unset BROKER_A
     fi      
     if [[ $BROKER_B ]] ; then
-        ../qpidd -q --port $BROKER_B
+        $QPIDD_EXEC --no-module-dir -q --port $BROKER_B
         unset BROKER_B
     fi
 }
 
 setup() {
     rm -f replication-source.log replication-dest.log
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replicating_listener.so
--replication-queue replication --create-replication-queue true  --log-enable trace+ --log-to-file
replication-source.log --log-to-stderr 0 > qpidd-repl.port
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATING_LISTENER_LIB
--replication-queue replication --create-replication-queue true  --log-enable trace+ --log-to-file
replication-source.log --log-to-stderr 0 > qpidd-repl.port
     BROKER_A=`cat qpidd-repl.port`
 
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replication_exchange.so
 --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd-repl.port
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB
 --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd-repl.port
     BROKER_B=`cat qpidd-repl.port`
 
-    #../qpidd --port 5555 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replicating_listener.so
--replication-queue replication --create-replication-queue true  --log-enable trace+ --log-to-file
replication-source.log --log-to-stderr 0 &
-    #BROKER_A=5555
-
-    #../qpidd --port 6666 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replication_exchange.so
 --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 &
-    #BROKER_B=6666
     echo "Testing replication from port $BROKER_A to port $BROKER_B"
 
     $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
@@ -78,7 +73,7 @@
     echo "Route re-established"
 }
 
-if test -d ${PYTHON_DIR} && test -e $QPID_MODULE_DIR/replicating_listener.so &&
test -e $QPID_MODULE_DIR/replication_exchange.so ;  then
+if test -d ${PYTHON_DIR} && test -e $REPLICATING_LISTENER_LIB && test -e
$REPLICATION_EXCHANGE_LIB ;  then
     setup
     for i in `seq 1 100000`; do echo Message $i; done > replicated.expected
     send &

Modified: qpid/trunk/qpid/cpp/src/tests/replication_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/replication_test?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/replication_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/replication_test Wed Dec  2 19:00:11 2009
@@ -27,22 +27,22 @@
 
 stop_brokers() {
     if [ x$BROKER_A != x ]; then
-        ../qpidd -q --port $BROKER_A
+        $QPIDD_EXEC --no-module-dir -q --port $BROKER_A
         unset BROKER_A
     fi      
     if [ x$BROKER_B != x ]; then
-        ../qpidd -q --port $BROKER_B
+        $QPIDD_EXEC --no-module-dir -q --port $BROKER_B
         unset BROKER_B
     fi
 }
 
-if test -d ${PYTHON_DIR} && test -f $QPID_MODULE_DIR/replicating_listener.so &&
test -f $QPID_MODULE_DIR/replication_exchange.so;  then
+if test -d ${PYTHON_DIR} && test -f "$REPLICATING_LISTENER_LIB" && test -f
"$REPLICATION_EXCHANGE_LIB";  then
     rm -f queue-*.repl replication-*.log #cleanup from any earlier runs
 
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replicating_listener.so
--replication-queue replication --create-replication-queue true  --log-enable info+ --log-to-file
replication-source.log  --log-to-stderr 0 > qpidd.port
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATING_LISTENER_LIB
--replication-queue replication --create-replication-queue true  --log-enable info+ --log-to-file
replication-source.log  --log-to-stderr 0 > qpidd.port
     BROKER_A=`cat qpidd.port`
 
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replication_exchange.so
 --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB
 --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
     BROKER_B=`cat qpidd.port`
     echo "Running replication test between localhost:$BROKER_A and localhost:$BROKER_B"
 
@@ -97,7 +97,7 @@
     ./receiver --port $BROKER_B --queue queue-e --messages 1 > /dev/null
 
     #shutdown broker A then check that broker Bs versions of the queues are as expected
-    ../qpidd -q --port $BROKER_A
+    $QPIDD_EXEC --no-module-dir -q --port $BROKER_A
     unset BROKER_A
 
     #validate replicated queues:
@@ -118,10 +118,10 @@
 
     # now check offsets working (enqueue based on position being set, not queue abs position)
     
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replicating_listener.so
--replication-queue replication --create-replication-queue true  --log-enable info+ --log-to-file
replication-source.log  --log-to-stderr 0 > qpidd.port 
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATING_LISTENER_LIB
--replication-queue replication --create-replication-queue true  --log-enable info+ --log-to-file
replication-source.log  --log-to-stderr 0 > qpidd.port 
     BROKER_A=`cat qpidd.port`
 
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replication_exchange.so
 --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB
 --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
     BROKER_B=`cat qpidd.port`
 
     $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
@@ -147,9 +147,9 @@
     ./receiver --port $BROKER_B --queue queue-d --messages 1 > /dev/null
 
     # now check offsets working
-    ../qpidd -q --port $BROKER_B
+    $QPIDD_EXEC --no-module-dir -q --port $BROKER_B
     unset BROKER_B
-    ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $QPID_MODULE_DIR/replication_exchange.so
 --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
+    $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB
 --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
     BROKER_B=`cat qpidd.port`
 
     $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_acl_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_acl_tests Wed Dec  2 19:00:11 2009
@@ -26,20 +26,20 @@
 trap stop_brokers INT TERM QUIT
 
 start_brokers() {
-    ../qpidd --daemon --port 0 --no-module-dir --data-dir $DATA_DIR --load-module $QPID_MODULE_DIR/acl.so
--acl-file policy.acl --auth no > qpidd.port
+    ../qpidd --daemon --port 0 --no-module-dir --data-dir $DATA_DIR --load-module $ACL_LIB
--acl-file policy.acl --auth no > qpidd.port
     LOCAL_PORT=`cat qpidd.port`
 }
 
 stop_brokers() {
-        ../qpidd -q --port $LOCAL_PORT
+        $QPIDD_EXEC --no-module-dir -q --port $LOCAL_PORT
 }
 
 test_loading_acl_from_absolute_path(){
     POLICY_FILE=$srcdir/policy.acl
     rm -f temp.log
-    PORT=`../qpidd --daemon --port 0 --no-module-dir --no-data-dir --auth no --load-module
$QPID_MODULE_DIR/acl.so --acl-file $POLICY_FILE -t --log-to-file temp.log  2>/dev/null`
+    PORT=`../qpidd --daemon --port 0 --no-module-dir --no-data-dir --auth no --load-module
$ACL_LIB --acl-file $POLICY_FILE -t --log-to-file temp.log  2>/dev/null`
     ACL_FILE=`grep "notice Read ACL file" temp.log | sed 's/^.*Read ACL file //'`
-   ../qpidd -q --port $PORT
+   $QPIDD_EXEC --no-module-dir -q --port $PORT
    if test "$ACL_FILE" != "\"$POLICY_FILE\""; then
      echo "unable to load policy file from an absolute path";
      return 1;

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_cli_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_cli_tests Wed Dec  2 19:00:11 2009
@@ -34,8 +34,8 @@
 }
 
 stop_brokers() {
-        ../qpidd -q --port $LOCAL_PORT
-        ../qpidd -q --port $REMOTE_PORT
+        $QPIDD_EXEC --no-module-dir -q --port $LOCAL_PORT
+        $QPIDD_EXEC --no-module-dir -q --port $REMOTE_PORT
 }
 
 if test -d ${PYTHON_DIR} ;  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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_cluster_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_cluster_tests Wed Dec  2 19:00:11 2009
@@ -22,8 +22,7 @@
 source ./test_env.sh
 source $srcdir/ais_check
 
-TEST_EXEC=$QPID_PYTHON_COMMANDS/qpid-python-test
-test -x  $TEST_EXEC || { echo Skipping test, $TEST_EXEC not found; exit 0; }
+test -x  $QPID_PYTHON_TEST || { echo Skipping test, $QPID_PYTHON_TEST not found; exit 0;
}
 
 # Delete old cluster test data
 OUTDIR=brokertest.tmp
@@ -34,6 +33,6 @@
 CLUSTER_TESTS_IGNORE=${CLUSTER_TESTS_IGNORE:--i cluster_tests.StoreTests.* -I $srcdir/cluster_tests.fail}
 CLUSTER_TESTS=${CLUSTER_TESTS:-$*}
 
-with_ais_group $TEST_EXEC -DOUTDIR=$OUTDIR -m cluster_tests $CLUSTER_TESTS_IGNORE $CLUSTER_TESTS
|| exit 1
+with_ais_group $QPID_PYTHON_TEST -DOUTDIR=$OUTDIR -m cluster_tests $CLUSTER_TESTS_IGNORE
$CLUSTER_TESTS || exit 1
 rm -rf $OUTDIR
 #exit 0

Modified: qpid/trunk/qpid/cpp/src/tests/run_failover_soak
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_failover_soak?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_failover_soak (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_failover_soak Wed Dec  2 19:00:11 2009
@@ -24,7 +24,8 @@
 
 host=127.0.0.1
 
-MODULES=${MODULES:-$QPID_MODULE_DIR}
+unset QPID_NO_MODULE_DIR	# failover_soak uses --module-dir, dont want clash
+MODULES=${MODULES:-$moduledir}
 MESSAGES=${MESSAGES:-1000000}
 REPORT_FREQUENCY=${REPORT_FREQUENCY:-20000}
 VERBOSITY=${VERBOSITY:-10}

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=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_federation_tests (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_federation_tests Wed Dec  2 19:00:11 2009
@@ -33,8 +33,8 @@
 }
 
 stop_brokers() {
-        ../qpidd -q --port $LOCAL_PORT
-        ../qpidd -q --port $REMOTE_PORT
+        $QPIDD_EXEC --no-module-dir -q --port $LOCAL_PORT
+        $QPIDD_EXEC --no-module-dir -q --port $REMOTE_PORT
 }
 
 if test -d ${PYTHON_DIR} ;  then

Modified: qpid/trunk/qpid/cpp/src/tests/ssl_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ssl_test?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ssl_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/ssl_test Wed Dec  2 19:00:11 2009
@@ -20,7 +20,6 @@
 #
 
 # Run a simple test over SSL
-
 source ./test_env.sh
 
 CONFIG=$(dirname $0)/config.null
@@ -47,12 +46,12 @@
 }
 
 start_broker() {
-    PORT=`../qpidd --daemon --transport ssl --port 0 --ssl-port 0 --no-data-dir --no-module-dir
--auth no --config $CONFIG --load-module $QPID_MODULE_DIR/ssl.so --ssl-cert-db $CERT_DIR --ssl-cert-password-file
$CERT_PW_FILE --ssl-cert-name $TEST_HOSTNAME`
+    PORT=`../qpidd --daemon --transport ssl --port 0 --ssl-port 0 --no-data-dir --no-module-dir
--auth no --config $CONFIG --load-module $SSL_LIB --ssl-cert-db $CERT_DIR --ssl-cert-password-file
$CERT_PW_FILE --ssl-cert-name $TEST_HOSTNAME`
 }
 
 stop_broker() {
     if [[ $PORT ]] ; then
-        ../qpidd -q --port $PORT
+        $QPIDD_EXEC --no-module-dir -q --port $PORT
     fi
 }
 
@@ -76,7 +75,7 @@
 start_broker || error "Could not start broker"
 echo "Running SSL test on port $PORT"
 export QPID_NO_MODULE_DIR=1
-export QPID_LOAD_MODULE=$QPID_MODULE_DIR/sslconnector.so
+export QPID_LOAD_MODULE=$SSLCONNECTOR_LIB
 export QPID_SSL_CERT_DB=${CERT_DIR}
 export QPID_SSL_CERT_PASSWORD_FILE=${CERT_PW_FILE}
 ./perftest --count ${COUNT} --port ${PORT} -P ssl -b $TEST_HOSTNAME --summary

Modified: qpid/trunk/qpid/cpp/src/tests/start_cluster
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/start_cluster?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/start_cluster (original)
+++ qpid/trunk/qpid/cpp/src/tests/start_cluster Wed Dec  2 19:00:11 2009
@@ -30,7 +30,7 @@
 
 SIZE=${1:-3}; shift
 CLUSTER=$HOSTNAME.$$
-OPTS="-d --no-module-dir --load-module $QPID_MODULE_DIR/cluster.so  --cluster-name=$CLUSTER
--auth=no --log-enable notice+ --log-enable debug+:cluster $@"
+OPTS="-d --no-module-dir --load-module $CLUSTER_LIB  --cluster-name=$CLUSTER --auth=no --log-enable
notice+ --log-enable debug+:cluster $@"
 
 for (( i=0; i<SIZE; ++i )); do
     DDIR=`mktemp -d /tmp/start_cluster.XXXXXXXXXX`

Modified: qpid/trunk/qpid/cpp/src/tests/start_cluster_hosts
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/start_cluster_hosts?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/start_cluster_hosts (original)
+++ qpid/trunk/qpid/cpp/src/tests/start_cluster_hosts Wed Dec  2 19:00:11 2009
@@ -52,7 +52,7 @@
 done
 shift `expr $OPTIND - 1`
 test -n "$PORT" && PORTOPT="-p $PORT"
-test "$KILL" = yes && KILL="$QPIDD -q $PORTOPT ;"
+test "$KILL" = yes && KILL="$QPIDD --no-module-dir -q $PORTOPT ;"
 CLUSTER=${*:-$CLUSTER}		# Use args or env
 test -z "$CLUSTER" && { echo Must specify at least one host; exit 1; }
 

Modified: qpid/trunk/qpid/cpp/src/tests/stop_broker
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/stop_broker?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/stop_broker (original)
+++ qpid/trunk/qpid/cpp/src/tests/stop_broker Wed Dec  2 19:00:11 2009
@@ -25,7 +25,7 @@
 export QPID_PORT
 rm -f qpidd.port
 
-../qpidd --quit || ERROR=1
+../qpidd --no-module-dir --quit || ERROR=1
 
 # Check qpidd.log.
 egrep 'warning\|error\|critical' qpidd.log && {

Modified: qpid/trunk/qpid/cpp/src/tests/stop_cluster
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/stop_cluster?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/stop_cluster (original)
+++ qpid/trunk/qpid/cpp/src/tests/stop_cluster Wed Dec  2 19:00:11 2009
@@ -23,7 +23,7 @@
 
 PORTS=`cat cluster.ports`
 for PORT in $PORTS ; do
-    ../qpidd -qp $PORT || ERROR="$ERROR $PORT"
+    $QPIDD_EXEC --no-module-dir -qp $PORT || ERROR="$ERROR $PORT"
 done
 rm -f cluster.ports qpidd.port
 

Modified: qpid/trunk/qpid/cpp/src/tests/test_env.sh.in
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/test_env.sh.in?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/test_env.sh.in (original)
+++ qpid/trunk/qpid/cpp/src/tests/test_env.sh.in Wed Dec  2 19:00:11 2009
@@ -20,13 +20,12 @@
 absdir() { echo `cd $1 && pwd`; }
 
 # Environment variables substituted by configure/cmake.
-export srcdir=@abs_srcdir@
-export builddir=@abs_builddir@
-export top_srcdir=@abs_top_srcdir@
-export top_builddir=@abs_top_builddir@
-
-export QPID_MODULE_DIR=$top_builddir/src@builddir_lib_suffix@
-export QPID_TEST_MODULE_DIR=$builddir@builddir_lib_suffix@
+srcdir=@abs_srcdir@
+builddir=@abs_builddir@
+top_srcdir=@abs_top_srcdir@
+top_builddir=@abs_top_builddir@
+moduledir=$top_builddir/src@builddir_lib_suffix@
+testmoduledir=$builddir@builddir_lib_suffix@
 
 # Python paths and directories
 export PYTHON_DIR=$builddir/python
@@ -41,8 +40,9 @@
 export QPID_ROUTE_EXEC=$PYTHON_COMMANDS/qpid-route
 export QPID_CLUSTER_EXEC=$PYTHON_COMMANDS/qpid-cluster
 
-# qpidd executable
+# Executables
 export QPIDD_EXEC=$top_builddir/src/qpidd
+export QPID_WATCHDOG_EXEC=$top_builddir/src/qpidd_watchdog
 
 # Test executables
 export QPID_TEST_EXEC_DIR=$builddir
@@ -50,19 +50,19 @@
 export SENDER_EXEC=$QPID_TEST_EXEC_DIR/sender
 
 # Modules
-export TEST_STORE_LIB=$QPID_TEST_MODULE_DIR/test_store.so
-export REPLICATING_LISTENER_LIB=$QPID_MODULE_DIR/replicating_listener.so
-export REPLICATION_EXCHANGE_LIB=$QPID_MODULE_DIR/replication_exchange.so
+export TEST_STORE_LIB=$testmoduledir/test_store.so
 
-# Optional modules, set only if present
-exportmodule() { test -f $QPID_MODULE_DIR/$2 && eval "export $1=$QPID_MODULE_DIR/$2";
}
+exportmodule() { test -f $moduledir/$2 && eval "export $1=$moduledir/$2"; }
 exportmodule ACL_LIB acl.so
 exportmodule CLUSTER_LIB cluster.so
-exportmodule SSL_CONNECTOR_LIB ssl_connector.so
+exportmodule REPLICATING_LISTENER_LIB replicating_listener.so
+exportmodule REPLICATION_EXCHANGE_LIB replication_exchange.so
+exportmodule SSLCONNECTOR_LIB sslconnector.so
 exportmodule SSL_LIB ssl.so
 exportmodule WATCHDOG_LIB watchdog.so
 exportmodule XML_LIB xml.so
 
 # Qpid options
+export QPID_NO_MODULE_DIR=1	# Don't accidentally load installed modules
 export QPID_DATA_DIR= 		# Default to no data dir, not ~/.qpidd
 

Modified: qpid/trunk/qpid/cpp/src/tests/test_watchdog
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/test_watchdog?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/test_watchdog (original)
+++ qpid/trunk/qpid/cpp/src/tests/test_watchdog Wed Dec  2 19:00:11 2009
@@ -1,10 +1,29 @@
 #!/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.
+#
+
 # Tests for the watchdog plug-in
 
 # Start a broker with  watchdog, freeze it with kill -STOP, verify that it is killed.
-export QPID_WATCHDOG_EXE=$PWD/../qpidd_watchdog
-PORT=`../qpidd -dp0 --no-data-dir --auth=no --no-module-dir --load-module $PWD/../.libs/watchdog.so
--log-to-file=qpidd_watchdog.log --watchdog-interval 1`
-PID=`../qpidd -cp $PORT`
+PORT=`$QPIDD_EXEC -dp0 --no-data-dir --auth=no --no-module-dir --load-module $WATCHDOG_LIB
--log-to-file=qpidd_watchdog.log --watchdog-interval 1`
+PID=`$QPIDD_EXEC --no-module-dir -cp $PORT`
 kill -STOP $PID
 sleep 2
 

Modified: qpid/trunk/qpid/cpp/src/tests/testlib.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/testlib.py?rev=886259&r1=886258&r2=886259&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/testlib.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/testlib.py Wed Dec  2 19:00:11 2009
@@ -118,7 +118,7 @@
     def stopBroker(self, nodeTuple, ignoreFailures = False):
         """Stop a broker using qpidd -q"""
         try:
-            ret = os.spawnl(os.P_WAIT, self._qpiddExec, self._qpiddExec, "--port=%d" % nodeTuple[self.PORT],
"--quit")
+            ret = os.spawnl(os.P_WAIT, self._qpiddExec, self._qpiddExec, "--port=%d" % nodeTuple[self.PORT],
"--quit", "--no-module-dir")
             if ret != 0:
                 raise Exception("stopBroker(): port=%d: qpidd -q returned %d" % (nodeTuple[self.PORT],
ret))
             try:
@@ -763,4 +763,4 @@
             msgList = TestBaseCluster.TestHelper.sendMsgs(self, "", numMsgs, nodeNumber,
msgSize, wait)
             for ml in self._txMsgs.itervalues():
                 ml.extend(msgList) 
-            
\ No newline at end of file
+            



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


Mime
View raw message