summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-01-29 18:18:52 +0000
committerAlan Conway <aconway@apache.org>2009-01-29 18:18:52 +0000
commitcd7e007f8f931f994c829e9853ecfbb469cb20aa (patch)
tree2f802a6f595c200968b57dab0c4e1b11a8ee3b1a /cpp/src
parenta87557a9083d558251e9a6ac4f1b544797f41429 (diff)
downloadqpid-python-cd7e007f8f931f994c829e9853ecfbb469cb20aa.tar.gz
Run python tests against a single-member cluster in check-long.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@738947 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/tests/Makefile.am12
-rw-r--r--cpp/src/tests/cluster.mk3
-rwxr-xr-xcpp/src/tests/cluster_python_tests5
-rw-r--r--cpp/src/tests/cluster_python_tests_failing.txt29
-rwxr-xr-xcpp/src/tests/python_tests19
-rwxr-xr-xcpp/src/tests/start_cluster17
-rwxr-xr-xcpp/src/tests/stop_cluster2
7 files changed, 58 insertions, 29 deletions
diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am
index fa9c5f3a01..4ab290722c 100644
--- a/cpp/src/tests/Makefile.am
+++ b/cpp/src/tests/Makefile.am
@@ -36,6 +36,7 @@ check_LTLIBRARIES=
TESTS=
EXTRA_DIST=
CLEANFILES=
+LONG_TESTS=
#
# Unit test program
@@ -224,7 +225,7 @@ EXTRA_DIST += \
TestMessageStore.h \
TxMocks.h \
replication_test \
- start_cluster stop_cluster restart_cluster
+ run_perftest
check_LTLIBRARIES += libdlclose_noop.la
libdlclose_noop_la_LDFLAGS = -module -rpath $(abs_builddir)
@@ -252,7 +253,10 @@ CLEANFILES+=valgrind.out *.log *.vglog* dummy_test $(unit_wrappers)
# Longer running stability tests, not run by default check: target.
# Not run under valgrind, too slow
-LONG_TESTS=fanout_perftest shared_perftest multiq_perftest topic_perftest run_failover_soak reliable_replication_test
-EXTRA_DIST+=$(LONG_TESTS) run_perftest
+
+LONG_TESTS+=start_broker fanout_perftest shared_perftest multiq_perftest topic_perftest run_failover_soak reliable_replication_test stop_broker
+
+EXTRA_DIST+=fanout_perftest shared_perftest multiq_perftest topic_perftest run_failover_soak reliable_replication_test
+
check-long:
- $(MAKE) check TESTS="start_broker $(LONG_TESTS) stop_broker" VALGRIND=
+ $(MAKE) check TESTS="$(LONG_TESTS)" VALGRIND=
diff --git a/cpp/src/tests/cluster.mk b/cpp/src/tests/cluster.mk
index 1f027ccb4c..d2ee3acf5d 100644
--- a/cpp/src/tests/cluster.mk
+++ b/cpp/src/tests/cluster.mk
@@ -30,7 +30,7 @@ if HAVE_LIBCPG
# ais_check checks pre-requisites for cluster tests and runs them if ok.
TESTS+=ais_check
-EXTRA_DIST+=ais_check start_cluster stop_cluster
+EXTRA_DIST+=ais_check start_cluster stop_cluster restart_cluster cluster_python_tests cluster_python_tests_failing.txt
check_PROGRAMS+=cluster_test
cluster_test_SOURCES=unit_test.cpp cluster_test.cpp
@@ -38,4 +38,5 @@ cluster_test_LDADD=$(lib_client) ../cluster.la -lboost_unit_test_framework
unit_test_LDADD+=../cluster.la
+LONG_TESTS+=start_cluster cluster_python_tests stop_cluster
endif
diff --git a/cpp/src/tests/cluster_python_tests b/cpp/src/tests/cluster_python_tests
new file mode 100755
index 0000000000..1a3fa4aff8
--- /dev/null
+++ b/cpp/src/tests/cluster_python_tests
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+FAILING=`dirname $0`/cluster_python_tests_failing.txt
+source `dirname $0`/python_tests
+
diff --git a/cpp/src/tests/cluster_python_tests_failing.txt b/cpp/src/tests/cluster_python_tests_failing.txt
new file mode 100644
index 0000000000..87d6fe52df
--- /dev/null
+++ b/cpp/src/tests/cluster_python_tests_failing.txt
@@ -0,0 +1,29 @@
+tests_0-10.dtx.DtxTests.test_bad_resume
+tests_0-10.dtx.DtxTests.test_commit_unknown
+tests_0-10.dtx.DtxTests.test_end
+tests_0-10.dtx.DtxTests.test_end_suspend_and_fail
+tests_0-10.dtx.DtxTests.test_end_unknown_xid
+tests_0-10.dtx.DtxTests.test_forget_xid_on_completion
+tests_0-10.dtx.DtxTests.test_get_timeout
+tests_0-10.dtx.DtxTests.test_get_timeout_unknown
+tests_0-10.dtx.DtxTests.test_implicit_end
+tests_0-10.dtx.DtxTests.test_invalid_commit_not_ended
+tests_0-10.dtx.DtxTests.test_invalid_commit_one_phase_false
+tests_0-10.dtx.DtxTests.test_invalid_commit_one_phase_true
+tests_0-10.dtx.DtxTests.test_invalid_prepare_not_ended
+tests_0-10.dtx.DtxTests.test_invalid_rollback_not_ended
+tests_0-10.dtx.DtxTests.test_prepare_unknown
+tests_0-10.dtx.DtxTests.test_recover
+tests_0-10.dtx.DtxTests.test_rollback_unknown
+tests_0-10.dtx.DtxTests.test_select_required
+tests_0-10.dtx.DtxTests.test_set_timeout
+tests_0-10.dtx.DtxTests.test_simple_commit
+tests_0-10.dtx.DtxTests.test_simple_prepare_commit
+tests_0-10.dtx.DtxTests.test_simple_prepare_rollback
+tests_0-10.dtx.DtxTests.test_simple_rollback
+tests_0-10.dtx.DtxTests.test_start_already_known
+tests_0-10.dtx.DtxTests.test_start_join
+tests_0-10.dtx.DtxTests.test_start_join_and_resume
+tests_0-10.dtx.DtxTests.test_suspend_resume
+tests_0-10.dtx.DtxTests.test_suspend_start_end_resume
+tests_0-10.message.MessageTests.test_ttl
diff --git a/cpp/src/tests/python_tests b/cpp/src/tests/python_tests
index 30bb8259a4..e56b91ba5c 100755
--- a/cpp/src/tests/python_tests
+++ b/cpp/src/tests/python_tests
@@ -22,18 +22,11 @@
# Run the python tests.
QPID_PORT=${QPID_PORT:-5672}
PYTHON_TESTS=${PYTHON_TESTS:-$*}
-MY_DIR=`dirname \`which $0\``
-QPID_PYTHON_DIR=${QPID_PYTHON_DIR:-${MY_DIR}/../../../python}
+QPID_PYTHON_DIR=${QPID_PYTHON_DIR:-`dirname $0`/../../../python}
+SPEC=${SPEC:-0-10-errata}
+FAILING=${FAILING:-cpp_failing_0-10.txt}
-run() {
- SPEC=$1
- FAILING=$2
- ./run-tests --skip-self-test -v -s $SPEC -I $FAILING -b localhost:$QPID_PORT $PYTHON_TESTS || { echo "FAIL python tests for $SPEC"; exit 1; }
-}
+test -d $QPID_PYTHON_DIR || { echo "WARNING: No python tests. $QPID_PYTHON_DIR not found."; exit 1; }
+cd $QPID_PYTHON_DIR
+./run-tests --skip-self-test -v -s $SPEC -I $FAILING -b localhost:$QPID_PORT $PYTHON_TESTS || { echo "FAIL python tests for $SPEC"; exit 1; }
-if test -d ${QPID_PYTHON_DIR} ; then
- cd ${QPID_PYTHON_DIR}
- run 0-10-errata cpp_failing_0-10.txt
-else
- echo "WARNING: No python tests. $QPID_PYTHON_DIR not found."
-fi
diff --git a/cpp/src/tests/start_cluster b/cpp/src/tests/start_cluster
index ee306edf14..a9b45421cb 100755
--- a/cpp/src/tests/start_cluster
+++ b/cpp/src/tests/start_cluster
@@ -30,17 +30,14 @@ with_ais_group() {
test -f cluster.ports && { echo "cluster.ports file already exists" ; exit 1; }
rm -f cluster*.log
-SIZE=$1; shift
+SIZE=${1:-1}; shift
CLUSTER=`pwd` # Cluster name=pwd, avoid clashes.
OPTS="-d --load-module ../.libs/cluster.so --cluster-name=$CLUSTER --no-data-dir --auth=no $*"
-if test "$SIZE" = "one"; then # Special case of singleton cluster, use default port.
- ../qpidd -q
- with_ais_group ../qpidd $OPTS --log-to-file=cluster.log || exit 1
-else
- for (( i=0; i<SIZE; ++i )); do
- PORT=`with_ais_group ../qpidd -p0 --log-to-file=cluster$i.log $OPTS` || exit 1
- echo $PORT >> cluster.ports
- done
-fi
+for (( i=0; i<SIZE; ++i )); do
+ PORT=`with_ais_group ../qpidd -p0 --log-to-file=cluster$i.log $OPTS` || exit 1
+ echo $PORT >> cluster.ports
+done
+
+head cluster.ports > qpidd.port # First member's port for tests.
diff --git a/cpp/src/tests/stop_cluster b/cpp/src/tests/stop_cluster
index b3f0e7395e..24b556a63b 100755
--- a/cpp/src/tests/stop_cluster
+++ b/cpp/src/tests/stop_cluster
@@ -25,7 +25,7 @@ PORTS=`cat cluster.ports`
for PORT in $PORTS ; do
../qpidd -qp $PORT || ERROR="$ERROR $PORT"
done
-rm -f cluster.ports
+rm -f cluster.ports qpidd.port
if [ -n "$ERROR" ]; then
echo "Errors stopping brokers on ports: $ERROR"