summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/run_federation_tests
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-04-09 19:52:44 +0000
committerGordon Sim <gsim@apache.org>2008-04-09 19:52:44 +0000
commitc2d21d3903178152a0873d6f274968c2f91c8ea6 (patch)
tree482408cc06653a100ff98da6be0ee575fa4c002e /qpid/cpp/src/tests/run_federation_tests
parent5fa4134e135e28460cf05ff15525cf4e84aa373f (diff)
downloadqpid-python-c2d21d3903178152a0873d6f274968c2f91c8ea6.tar.gz
Fixes and automated tests for federation function.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@646505 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/run_federation_tests')
-rwxr-xr-xqpid/cpp/src/tests/run_federation_tests24
1 files changed, 24 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/run_federation_tests b/qpid/cpp/src/tests/run_federation_tests
new file mode 100755
index 0000000000..63f0baa1ae
--- /dev/null
+++ b/qpid/cpp/src/tests/run_federation_tests
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Run the federation tests.
+
+trap stop_brokers EXIT
+
+start_brokers() {
+ ../qpidd --daemon --port 0 --no-data-dir > qpidd.port
+ LOCAL_PORT=`cat qpidd.port`
+ ../qpidd --daemon --port 0 --no-data-dir > qpidd.port
+ REMOTE_PORT=`cat qpidd.port`
+}
+
+stop_brokers() {
+ ../qpidd -q --port $LOCAL_PORT
+ ../qpidd -q --port $REMOTE_PORT
+}
+
+if test -d ../../../python ; then
+ start_brokers
+ echo "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
+ export PYTHONPATH=../../../python
+ ./federation.py -v -s ../../../specs/amqp.0-10-preview.xml -b localhost:$LOCAL_PORT --remote-port $REMOTE_PORT || { echo "FAIL federation tests"; exit 1; }
+fi
+