Author: kpvdr
Date: 2009-08-18 14:32:26 -0400 (Tue, 18 Aug 2009)
New Revision: 3583
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Updated run_cluster_tests script for ptolemy environment
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-08-17 18:49:06 UTC (rev 3582)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-08-18 18:32:26 UTC (rev 3583)
@@ -103,74 +103,71 @@
return 0
}
-
-func_set_svn_env ()
-#------------------
-# Set up the environment based on value of ${QPID_DIR}/${QPID_BLD} for testing against a
svn checkout qpid
-# If ${QPID_BLD} is set, a vpath build is assumed
-# QPID_DIR is defined for source tree builds by the --with-qpid-checkout configure
option.
-# QPID_BLD is defined as the build directory, either $QPID_DIR/cpp or separately
specified with
-# the --with-qpid-build option for VPATH builds.
+func_set_env ()
+#--------------
+# Set up the environment based on value of ${QPID_DIR}: if ${QPID_DIR} exists, assume a
svn checkout,
+# otherwise set up for an installed or prefix test.
# Params: None
# Returns: Nothing
{
- # Check QPID_BLD is also set
- if test -z ${QPID_BLD}; then
- QPID_BLD="${QPID_DIR}/cpp"
- fi
+ if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
+ # QPID_DIR is defined for source tree builds by the --with-qpid-checkout
configure option.
+ # QPID_BLD is defined as the build directory, either $QPID_DIR/cpp or separately
specified with
+ # the --with-qpid-build option for VPATH builds.
+
+ # Check QPID_BLD is also set
+ if test -z ${QPID_BLD}; then
+ QPID_BLD="${QPID_DIR}/cpp"
+ fi
- # Paths and dirs
- PYTHON_DIR="${QPID_DIR}/python"
- export
PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
+ # Paths and dirs
+ PYTHON_DIR="${QPID_DIR}/python"
+ export
PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
- # Libraries
- export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
- export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
+ # Libraries
+ export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
+ export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
- # Executables
- CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
- PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
- export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
- export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
- export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
-}
-
-
-func_set_prefix_evn ()
-#---------------------
-# Set up the environment based on value of ${QPID_PREFIX} for testing against an
installed qpid
-# Alternatively, make sure ${QPID_BIN_DIR}, ${QPID_SBIN_DIR}, ${QPID_LIB_DIR} and
${QPID_LIBEXEC_DIR} are set for
-# the installed location.
-# Params: None
-# Returns: Nothing
-{
- if test "${QPID_PREFIX}" -a -d "${QPID_PREFIX}" ; then
- QPID_BIN_DIR=${QPID_PREFIX}/bin
- QPID_SBIN_DIR=${QPID_PREFIX}/sbin
- QPID_LIB_DIR=${QPID_PREFIX}/lib
- QPID_LIBEXEC_DIR=${QPID_PREFIX}/libexec
- fi
+ # Executables
+ CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
+ PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
+ export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
+ export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
+ export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
+ export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
+ export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
+ else
+ # Set up the environment based on value of ${QPID_PREFIX} for testing against an
installed qpid
+ # Alternatively, make sure ${QPID_BIN_DIR}, ${QPID_SBIN_DIR}, ${QPID_LIB_DIR} and
${QPID_LIBEXEC_DIR} are set for
+ # the installed location.
+ if test "${QPID_PREFIX}" -a -d "${QPID_PREFIX}" ; then
+ QPID_BIN_DIR=${QPID_PREFIX}/bin
+ QPID_SBIN_DIR=${QPID_PREFIX}/sbin
+ QPID_LIB_DIR=${QPID_PREFIX}/lib
+ QPID_LIBEXEC_DIR=${QPID_PREFIX}/libexec
+ fi
- # These four env vars must be set prior to calling this script
- func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
+ # These four env vars must be set prior to calling this script
+ func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
- # Paths and dirs
- export
PYTHONPATH="${QPID_LIB_DIR}/python":"${QPID_LIBEXEC_DIR}/qpid/tests":"${QPID_LIB_DIR}/python2.4"
+ # Paths and dirs
+ export PYTHON_DIR="${QPID_BIN_DIR}"
+ export
PYTHONPATH="${PYTHONPATH}":"${QPID_LIB_DIR}/python":"${QPID_LIBEXEC_DIR}/qpid/tests":"${QPID_LIB_DIR}/python2.4"
+
- # Libraries
- export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
- export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
+ # Libraries
+ export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
+ export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
- # Executables
- CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
- PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_SBIN_DIR}/qpidd"
- export QPID_CONFIG_EXEC="${QPID_BIN_DIR}/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_BIN_DIR}/qpid-route"
- export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
- export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
+ # Executables
+ CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/$PYTHON_TESTNAME"
+ export QPIDD_EXEC="${QPID_SBIN_DIR}/qpidd"
+ export QPID_CONFIG_EXEC="${QPID_BIN_DIR}/qpid-config"
+ export QPID_ROUTE_EXEC="${QPID_BIN_DIR}/qpid-route"
+ export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
+ export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
+ fi
}
@@ -283,11 +280,7 @@
export STORE_LIB="${abs_srcdir}/../../lib/.libs/msgstore.so"
PYTHON_TESTNAME=cluster_tests.py
-if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
- func_set_svn_env
-else
- func_set_prefix_evn
-fi
+func_set_env
func_mk_data_dir
# Check expected environment vars are set
Show replies by date