summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-10-22 21:04:31 +0000
committerAlan Conway <aconway@apache.org>2008-10-22 21:04:31 +0000
commit2eef956d0930b426ba916058b1b30001d1007d6c (patch)
tree15ca2892d79e121ae53d318b5d7ce78f93ce86b1 /cpp/src
parent4c0c417d63b96e910925a343d63bde5481ba5698 (diff)
downloadqpid-python-2eef956d0930b426ba916058b1b30001d1007d6c.tar.gz
Fixed run_acl_tests to work in a VPATH build.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@707193 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/tests/run_acl_tests17
1 files changed, 9 insertions, 8 deletions
diff --git a/cpp/src/tests/run_acl_tests b/cpp/src/tests/run_acl_tests
index 1f29bb4907..b7da8b01b9 100755
--- a/cpp/src/tests/run_acl_tests
+++ b/cpp/src/tests/run_acl_tests
@@ -1,12 +1,13 @@
#!/bin/sh
# Run the acl tests.
-MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
+srcdir=`dirname $0`
+PYTHON_DIR=$srcdir/../../../python
+DATA_DIR=`pwd`/data_dir
trap stop_brokers INT TERM QUIT
start_brokers() {
- ../qpidd --daemon --port 0 --no-module-dir --data-dir ${MY_DIR}/data_dir --load-module ../.libs/acl.so --enforce-acl --auth no > qpidd.port
+ ../qpidd --daemon --port 0 --no-module-dir --data-dir $DATA_DIR --load-module ../.libs/acl.so --enforce-acl --auth no > qpidd.port
LOCAL_PORT=`cat qpidd.port`
}
@@ -15,18 +16,18 @@ stop_brokers() {
}
if test -d ${PYTHON_DIR} ; then
- mkdir ${MY_DIR}/data_dir
- cp ${MY_DIR}/policy.acl ${MY_DIR}/data_dir/
+ mkdir $DATA_DIR
+ cp $srcdir/policy.acl $DATA_DIR
start_brokers
echo "Running acl tests using brokers on ports $LOCAL_PORT"
- PYTHONPATH=${PYTHON_DIR}
+ PYTHONPATH=$PYTHON_DIR
export PYTHONPATH
- ${MY_DIR}/acl.py -v -s ${MY_DIR}/../../../specs/amqp.0-10-qpid-errata.xml -b localhost:$LOCAL_PORT --port $LOCAL_PORT
+ $srcdir/acl.py -v -s $srcdir/../../../specs/amqp.0-10-qpid-errata.xml -b localhost:$LOCAL_PORT --port $LOCAL_PORT
RETCODE=$?
stop_brokers
if test x$RETCODE != x0; then
echo "FAIL acl tests"; exit 1;
fi
- rm -rf ${MY_DIR}/data_dir
+ rm -rf $DATA_DIR
fi