You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2008/10/22 23:04:31 UTC

svn commit: r707193 - /incubator/qpid/trunk/qpid/cpp/src/tests/run_acl_tests

Author: aconway
Date: Wed Oct 22 14:04:31 2008
New Revision: 707193

URL: http://svn.apache.org/viewvc?rev=707193&view=rev
Log:
Fixed run_acl_tests to work in a VPATH build.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/tests/run_acl_tests

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/run_acl_tests
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/run_acl_tests?rev=707193&r1=707192&r2=707193&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/run_acl_tests (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/run_acl_tests Wed Oct 22 14:04:31 2008
@@ -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 @@
 }
 
 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