Author: rschloming
Date: 2009-08-11 17:06:33 -0400 (Tue, 11 Aug 2009)
New Revision: 3556
Modified:
store/trunk/cpp/tests/persistence.py
store/trunk/cpp/tests/run_python_tests
Log:
fixed store/python test integration
Modified: store/trunk/cpp/tests/persistence.py
===================================================================
--- store/trunk/cpp/tests/persistence.py 2009-08-10 18:18:00 UTC (rev 3555)
+++ store/trunk/cpp/tests/persistence.py 2009-08-11 21:06:33 UTC (rev 3556)
@@ -24,7 +24,6 @@
from qpid.connection import Connection
from qpid.util import connect
-from qpid.spec010 import load
from qpid.datatypes import Message, RangedSet
from qpid.queue import Empty
from qpid.session import SessionException
@@ -498,7 +497,7 @@
def connect(self):
""" Connects to the broker """
- self.conn = Connection(connect(self.host, self.port), load(self.spec,
*self.errata))
+ self.conn = Connection(connect(self.host, self.port))
self.conn.start(timeout=10)
self.session = self.conn.session("test-session", timeout=10)
Modified: store/trunk/cpp/tests/run_python_tests
===================================================================
--- store/trunk/cpp/tests/run_python_tests 2009-08-10 18:18:00 UTC (rev 3555)
+++ store/trunk/cpp/tests/run_python_tests 2009-08-11 21:06:33 UTC (rev 3556)
@@ -62,8 +62,6 @@
fi
STORE_DIR=${TMP_DATA_DIR}/python
-BROKER_OPTS="--no-module-dir --load-module=${STORE_LIB} --data-dir=${STORE_DIR}
--auth=no --log-enable info+ --log-to-file ${STORE_DIR}/broker.python-test.log"
-AMQP_SPEC=0-10-errata
#Make sure temp dir exists if this is the first to use it
if test -d ${STORE_DIR} ; then
@@ -75,12 +73,22 @@
export QPIDD=${QPID_BLD}/src/qpidd
fi
+trap stop_broker INT TERM QUIT
+
+start_broker() {
+ ${QPIDD} --daemon --port 0 --no-module-dir --load-module=${STORE_LIB}
--data-dir=${STORE_DIR} --auth=no --log-enable info+ --log-to-file
${STORE_DIR}/broker.python-test.log > qpidd.port
+ LOCAL_PORT=`cat qpidd.port`
+}
+
+stop_broker() {
+ ${QPIDD} -q --port $LOCAL_PORT
+}
+
fail=0
# Run all python tests
-pwdir=$(pwd)
-cd ${QPID_PYTHON_DIR}
-./run-tests --skip-self-test -v -s ${AMQP_SPEC} -I ${FAILING_PYTHON_TESTS} -B
"${BROKER_OPTS}" ${PYTHON_TESTS} || { echo "FAIL python tests for
${AMQP_SPEC}"; fail=1; }
-cd ${pwdir}
+start_broker
+$QPID_PYTHON_DIR/qpid-python-test -m python_tests -b localhost:$LOCAL_PORT -I
${FAILING_PYTHON_TESTS} ${PYTHON_TESTS} || { echo "FAIL python tests"; fail=1;
}
+stop_broker || fail=1
exit ${fail}