Author: astitcher
Date: Wed Apr 23 08:58:39 2008
New Revision: 650922
URL: http://svn.apache.org/viewvc?rev=650922&view=rev
Log:
Make python tests work with VPATH builds
Modified:
incubator/qpid/trunk/qpid/cpp/src/tests/python_tests
incubator/qpid/trunk/qpid/cpp/src/tests/run_federation_tests
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/python_tests
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/python_tests?rev=650922&r1=650921&r2=650922&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/python_tests (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/python_tests Wed Apr 23 08:58:39
2008
@@ -2,6 +2,8 @@
# Run the python tests.
QPID_PORT=${QPID_PORT:-5672}
PYTHON_TESTS=${PYTHON_TESTS:-$*}
+MY_DIR=$(dirname $(which $0))
+PYTHON_DIR=${MY_DIR}/../../../python
run() {
SPEC=$1
@@ -9,8 +11,8 @@
./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 ../../../python ; then
- cd ../../../python
+if test -d ${PYTHON_DIR} ; then
+ cd ${PYTHON_DIR}
run 0-10-errata cpp_failing_0-10.txt
if test -z "$QPID_NO_PREVIEW" ; then run ../specs/amqp.0-10-preview.xml
cpp_failing_0-10_preview.txt; fi
else
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/run_federation_tests
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/run_federation_tests?rev=650922&r1=650921&r2=650922&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/run_federation_tests (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/run_federation_tests Wed Apr 23
08:58:39 2008
@@ -1,5 +1,7 @@
#!/bin/sh
# Run the federation tests.
+MY_DIR=$(dirname $(which $0))
+PYTHON_DIR=${MY_DIR}/../../../python
trap stop_brokers EXIT
@@ -15,10 +17,10 @@
../qpidd -q --port $REMOTE_PORT
}
-if test -d ../../../python ; then
+if test -d ${PYTHON_DIR} ; 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-qpid-errata.xml -b
localhost:$LOCAL_PORT --remote-port $REMOTE_PORT || { echo "FAIL federation
tests"; exit 1; }
+ export PYTHONPATH=${PYTHON_DIR}
+ ${MY_DIR}/federation.py -v -s
${MY_DIR}/../../../specs/amqp.0-10-qpid-errata.xml -b localhost:$LOCAL_PORT
--remote-port $REMOTE_PORT || { echo "FAIL federation tests"; exit 1; }
fi