rhmessaging commits: r3516 - store.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-07-22 13:36:28 -0400 (Wed, 22 Jul 2009)
New Revision: 3516
Removed:
store/old-and-forgotten/
Log:
Deleting 1.3 gigs of "old and forgotten" tarballs and snapshots. This
directory hasn't been touched in two years, and it includes a lot of
svn externals that no longer work. It's time for it to go.
15 years, 7 months
rhmessaging commits: r3515 - in mgmt/trunk: cumin/instance/etc and 2 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-07-22 11:49:01 -0400 (Wed, 22 Jul 2009)
New Revision: 3515
Added:
mgmt/trunk/cumin/instance/etc/mint.conf
Modified:
mgmt/trunk/cumin/bin/cumin
mgmt/trunk/cumin/instance/etc/cumin.conf
mgmt/trunk/cumin/python/cumin/config.py
mgmt/trunk/cumin/python/cumin/main.py
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/tools.py
mgmt/trunk/mint/python/mint/model.py
mgmt/trunk/mint/python/mint/tools.py
Log:
* Use a configuration parameter instead of a database table to
indicate qmf servers; disable the no longer necessary database
polling as a result
* Make CuminConfig serve to configure the mint instance used
internally by cumin
* Adapt the cumin command to use mint config out of CUMIN_HOME
* Fix up some logging
Modified: mgmt/trunk/cumin/bin/cumin
===================================================================
--- mgmt/trunk/cumin/bin/cumin 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/cumin/bin/cumin 2009-07-22 15:49:01 UTC (rev 3515)
@@ -1,5 +1,11 @@
#!/bin/bash
+if [[ "$CUMIN_HOME" ]]; then
+ export MINT_HOME="$CUMIN_HOME"
+else
+ export MINT_HOME="/var/lib/cumin"
+fi
+
function die {
kill "$mpid"
kill "$cpid"
Modified: mgmt/trunk/cumin/instance/etc/cumin.conf
===================================================================
--- mgmt/trunk/cumin/instance/etc/cumin.conf 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/cumin/instance/etc/cumin.conf 2009-07-22 15:49:01 UTC (rev 3515)
@@ -1,3 +1,4 @@
[main]
+data: postgresql://cumin@localhost/cumin
debug: True
user: guest
Added: mgmt/trunk/cumin/instance/etc/mint.conf
===================================================================
--- mgmt/trunk/cumin/instance/etc/mint.conf (rev 0)
+++ mgmt/trunk/cumin/instance/etc/mint.conf 2009-07-22 15:49:01 UTC (rev 3515)
@@ -0,0 +1 @@
+link cumin.conf
\ No newline at end of file
Property changes on: mgmt/trunk/cumin/instance/etc/mint.conf
___________________________________________________________________
Name: svn:special
+ *
Modified: mgmt/trunk/cumin/python/cumin/config.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/config.py 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/cumin/python/cumin/config.py 2009-07-22 15:49:01 UTC (rev 3515)
@@ -14,15 +14,18 @@
hdef = os.path.normpath("/var/lib/cumin")
self.home = os.environ.get("CUMIN_HOME", hdef)
+ if not os.path.isdir(self.home):
+ raise Exception("Home path '%s' is not a directory")
+
sdef = os.path.normpath("/usr/share/amqp/amqp.0-10-qpid-errata.xml")
self.spec = os.environ.get("AMQP_SPEC", sdef)
- if not os.path.isdir(self.home):
- raise Exception("Home path '%s' is not a directory")
-
param = ConfigParameter(self, "data", str)
param.default = "postgresql://cumin@localhost/cumin"
+ param = ConfigParameter(self, "qmf", str)
+ param.default = "amqp://localhost"
+
param = ConfigParameter(self, "log-file", str)
param.default = os.path.join(self.home, "log", "cumin.log")
@@ -36,13 +39,21 @@
param = ConfigParameter(self, "operator-email", str)
- def init(self):
+ self.expire_frequency = 600
+ self.expire_threshold = 24 * 3600
+
+ def init(self, opts=None):
super(CuminConfig, self).init()
self.load_file(os.path.join(self.home, "etc", "cumin.conf"))
self.load_file(os.path.join(os.path.expanduser("~"), ".cumin.conf"))
+ if opts:
+ self.load_dict(opts)
+
enable_logging("cumin", self.log_level, self.log_file)
+ enable_logging("mint", self.log_level, self.log_file)
if self.debug:
enable_logging("cumin", "debug", sys.stderr)
+ enable_logging("mint", "debug", sys.stderr)
Modified: mgmt/trunk/cumin/python/cumin/main.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/main.py 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/cumin/python/cumin/main.py 2009-07-22 15:49:01 UTC (rev 3515)
@@ -175,9 +175,6 @@
self.view = OverviewView(app, "view")
self.add_mode(self.view)
- self.mservers_add = ManagementServerSetAdd(app, "mserversadd")
- self.add_mode(self.mservers_add)
-
def render_title(self, session):
return "Overview"
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/cumin/python/cumin/model.py 2009-07-22 15:49:01 UTC (rev 3515)
@@ -22,14 +22,11 @@
def __init__(self, app, data_uri):
self.app = app
- opts = {"data": data_uri, "qmf": None}
+ config = app.config
- config = MintConfig()
- config.init(opts)
-
self.mint = Mint(config)
self.mint.updateEnabled = False
- self.mint.pollEnabled = True
+ self.mint.pollEnabled = False
self.mint.expireEnabled = False
self.classes = list()
Modified: mgmt/trunk/cumin/python/cumin/tools.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/tools.py 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/cumin/python/cumin/tools.py 2009-07-22 15:49:01 UTC (rev 3515)
@@ -40,6 +40,10 @@
opt.argument = "URI"
opt.description = "Connect to database at URI"
+ opt = CommandOption(self, "qmf")
+ opt.argument = "URI"
+ opt.description = "Connect to QMF server at URI"
+
opt = CommandOption(self, "log-file")
opt.argument = "PATH"
opt.description = "Log to file at PATH"
Modified: mgmt/trunk/mint/python/mint/model.py
===================================================================
--- mgmt/trunk/mint/python/mint/model.py 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/mint/python/mint/model.py 2009-07-22 15:49:01 UTC (rev 3515)
@@ -203,14 +203,19 @@
self.qmfSession = qmf.console.Session \
(self, manageConnections=True, rcvObjects=self.app.updateEnabled)
- # clean up any transient objects that a previous instance may have left behind in the DB
- # it's basically an unconstrained agent disconnect update, for any agent
+ # clean up any transient objects that a previous instance may have
+ # left behind in the DB it's basically an unconstrained agent
+ # disconnect update, for any agent
+
up = update.AgentDisconnectUpdate(self, 0)
self.app.updateThread.enqueue(up)
def start(self):
- pass
+ uris = [x.strip() for x in self.app.config.qmf.split(",")]
+ for uri in uris:
+ self.addBroker(uri)
+
def stop(self):
for mbroker in self.mintBrokersById.values():
self.delBroker(mbroker)
Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py 2009-07-21 19:11:17 UTC (rev 3514)
+++ mgmt/trunk/mint/python/mint/tools.py 2009-07-22 15:49:01 UTC (rev 3515)
@@ -19,6 +19,10 @@
opt.argument = "URI"
opt.description = "Connect to database at URI"
+ opt = CommandOption(self, "qmf")
+ opt.argument = "URI"
+ opt.description = "Connect to QMF server at URI"
+
opt = CommandOption(self, "log-file")
opt.argument = "PATH"
opt.description = "Log to file at PATH"
@@ -90,8 +94,6 @@
def do_run(self, opts, args):
app = Mint(self.config)
- app.pollEnabled = True
-
app.check()
app.init()
app.start()
15 years, 7 months
rhmessaging commits: r3514 - mgmt/trunk/parsley/python/parsley.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-07-21 15:11:17 -0400 (Tue, 21 Jul 2009)
New Revision: 3514
Modified:
mgmt/trunk/parsley/python/parsley/config.py
Log:
Only set the parameter value if the attribute is initialized
Modified: mgmt/trunk/parsley/python/parsley/config.py
===================================================================
--- mgmt/trunk/parsley/python/parsley/config.py 2009-07-20 19:41:30 UTC (rev 3513)
+++ mgmt/trunk/parsley/python/parsley/config.py 2009-07-21 19:11:17 UTC (rev 3514)
@@ -24,7 +24,7 @@
params = dict()
- if (conf.has_section("main")):
+ if (conf.has_section("main")):
for key, value in conf.items("main"):
params[key] = value
@@ -38,8 +38,8 @@
name = param.name.replace("-", "_")
value = param.unmarshal(svalue)
- setattr(self, name, value)
-
+ if hasattr(self, name):
+ setattr(self, name, value)
else:
log.info("Ignoring unrecognized parameter '%s'" % sname)
15 years, 7 months
rhmessaging commits: r3513 - mgmt/trunk/parsley/python/parsley.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-07-20 15:41:30 -0400 (Mon, 20 Jul 2009)
New Revision: 3513
Modified:
mgmt/trunk/parsley/python/parsley/command.py
Log:
Count flags with no args as boolean trues
Modified: mgmt/trunk/parsley/python/parsley/command.py
===================================================================
--- mgmt/trunk/parsley/python/parsley/command.py 2009-07-20 13:53:19 UTC (rev 3512)
+++ mgmt/trunk/parsley/python/parsley/command.py 2009-07-20 19:41:30 UTC (rev 3513)
@@ -70,7 +70,7 @@
def find_opt(key):
try:
opt = self.options_by_param[key]
- opts[opt.name] = None
+ opts[opt.name] = True
return opt
except KeyError:
msg = "Option '%s' is unrecognized" % key
15 years, 7 months
rhmessaging commits: r3512 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-07-20 09:53:19 -0400 (Mon, 20 Jul 2009)
New Revision: 3512
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Another typo fix - adjustments to get Ptolemy to work correctly
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-20 13:18:01 UTC (rev 3511)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-20 13:53:19 UTC (rev 3512)
@@ -153,7 +153,7 @@
# Libraries
export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
- export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid-tests/test_store.so"
+ export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
# Executables
CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
15 years, 7 months
rhmessaging commits: r3511 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-07-20 09:18:01 -0400 (Mon, 20 Jul 2009)
New Revision: 3511
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Adjustments to get Ptolemy to work correctly
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-17 19:51:39 UTC (rev 3510)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-20 13:18:01 UTC (rev 3511)
@@ -152,21 +152,21 @@
export PYTHONPATH="${QPID_LIB_DIR}/python":"${QPID_LIB_DIR}/python2.4"
# Libraries
- export CLUSTER_LIB="${QPID_LIB_DIR}/cluster.so"
- export TEST_STORE_LIB="${QPID_LIB_DIR}/test_store.so"
+ 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}/cluster_test"
+ CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
if test ${LONG_TEST}; then
- PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/long_cluster_tests.py"
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/long_cluster_tests.py"
else
- PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/cluster_tests.py"
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_tests.py"
fi
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}/receiver"
- export SENDER_EXEC="${QPID_LIBEXEC_DIR}/sender"
+ export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
+ export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
fi
export STORE_LIB="${abs_srcdir}/../../lib/.libs/msgstore.so"
15 years, 7 months
rhmessaging commits: r3510 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-07-17 15:51:39 -0400 (Fri, 17 Jul 2009)
New Revision: 3510
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Further refinements to run_cluster_test
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-17 18:22:09 UTC (rev 3509)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-17 19:51:39 UTC (rev 3510)
@@ -22,7 +22,10 @@
# The GNU Lesser General Public License is available in the file COPYING.
# Check that an environment var is set (ie non-zero length)
-checkvar()
+# Params: $1 - env var to be checked
+# Returns: 0 = env var is set (ie non-zero length)
+# 1 = env var is not set
+func_checkvar ()
{
local loc_VAR=$1
if test -z ${!loc_VAR}; then
@@ -33,11 +36,13 @@
}
# Check a list of paths (each can contain ':'-separated sub-list) is set and valid (ie each path exists as a dir)
-checkpaths()
+# Params: $@ - List of path env vars to be checked
+# Returns: Nothing
+func_checkpaths ()
{
local loc_PATHS=$@
for path in ${loc_PATHS}; do
- checkvar ${path}
+ func_checkvar ${path}
if test $? == 0; then
local temp_IFS=${IFS}
IFS=":"
@@ -53,11 +58,13 @@
}
# Check that a list of libs is set and valid (ie each lib exists as an executable file)
-checklibs()
+# Params: $@ - List of lib values to be checked
+# Returns: Nothing
+func_checklibs ()
{
local loc_LIBS=$@
for lib in ${loc_LIBS[@]}; do
- checkvar ${lib}
+ func_checkvar ${lib}
if test $? == 0; then
if test ! -x ${!lib}; then
echo "WARNING: Library ${lib}=${!lib} not found."
@@ -67,11 +74,13 @@
}
# Check that a list of executable is set and valid (ie each exec exists as an executable file)
-checkexecs()
+# Params: $@ - List of exec values to be checked
+# Returns: Nothing
+func_checkexecs ()
{
local loc_EXECS=$@
for exec in ${loc_EXECS[@]}; do
- checkvar ${exec}
+ func_checkvar ${exec}
if test $? == 0; then
if test ! -x ${!exec}; then
echo "WARNING: Executable ${exec}=${!exec} not found or is not executable."
@@ -84,6 +93,7 @@
srcdir=`dirname $0`
+# If this script is run using parameter $1 = "LONG_TEST", then run the long test scripts
if test x$1 == x"LONG_TEST"; then
echo "Running long tests..."
LONG_TEST=1
@@ -114,56 +124,56 @@
# QPID_DIR is defined for source tree builds because of the --with-qpid-checkout config parameter
# If set, then set all the env vars from the correct places in the svn source tree.
-if test "${QPID_DIR}" -a -d ${QPID_DIR} ; then
+if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
# Paths and dirs
- export PYTHONPATH=${QPID_DIR}/python:${abs_srcdir}
+ export PYTHONPATH="${QPID_DIR}/python":"${abs_srcdir}"
# Libraries
- export CLUSTER_LIB=${QPID_DIR}/cpp/src/.libs/cluster.so
- export TEST_STORE_LIB=${QPID_DIR}/cpp/src/tests/.libs/test_store.so
+ export CLUSTER_LIB="${QPID_DIR}/cpp/src/.libs/cluster.so"
+ export TEST_STORE_LIB="${QPID_DIR}/cpp/src/tests/.libs/test_store.so"
# Executables
- CPP_CLUSTER_EXEC=${QPID_DIR}/cpp/src/tests/cluster_test
+ CPP_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/cluster_test"
if test ${LONG_TEST}; then
- PYTHON_CLUSTER_EXEC=${QPID_DIR}/cpp/src/tests/long_cluster_tests.py
+ PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/long_cluster_tests.py"
else
- PYTHON_CLUSTER_EXEC=${QPID_DIR}/cpp/src/tests/cluster_tests.py
+ PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/cluster_tests.py"
fi
- export QPIDD_EXEC=${QPID_DIR}/cpp/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_DIR}/cpp/src/tests/receiver
- export SENDER_EXEC=${QPID_DIR}/cpp/src/tests/sender
+ export QPIDD_EXEC="${QPID_DIR}/cpp/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_DIR}/cpp/src/tests/receiver"
+ export SENDER_EXEC="${QPID_DIR}/cpp/src/tests/sender"
else
# These four env vars must be set prior to calling this script
- checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
+ func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
# Paths and dirs
- export PYTHONPATH=${QPID_LIB_DIR}/python:${QPID_LIB_DIR}/python2.4
+ export PYTHONPATH="${QPID_LIB_DIR}/python":"${QPID_LIB_DIR}/python2.4"
# Libraries
- export CLUSTER_LIB=${QPID_LIB_DIR}/cluster.so
- export TEST_STORE_LIB=${QPID_LIB_DIR}/test_store.so
+ export CLUSTER_LIB="${QPID_LIB_DIR}/cluster.so"
+ export TEST_STORE_LIB="${QPID_LIB_DIR}/test_store.so"
# Executables
- CPP_CLUSTER_EXEC=${QPID_LIBEXEC_DIR}/cluster_test
+ CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/cluster_test"
if test ${LONG_TEST}; then
- PYTHON_CLUSTER_EXEC=${QPID_LIBEXEC_DIR}/long_cluster_tests.py
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/long_cluster_tests.py"
else
- PYTHON_CLUSTER_EXEC=${QPID_LIBEXEC_DIR}/cluster_tests.py
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/cluster_tests.py"
fi
- 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}/receiver
- export SENDER_EXEC=${QPID_LIBEXEC_DIR}/sender
+ 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}/receiver"
+ export SENDER_EXEC="${QPID_LIBEXEC_DIR}/sender"
fi
-export STORE_LIB=${abs_srcdir}/../../lib/.libs/msgstore.so
+export STORE_LIB="${abs_srcdir}/../../lib/.libs/msgstore.so"
# Check expected environment vars are set
-checkpaths PYTHONPATH
-checklibs CLUSTER_LIB TEST_STORE_LIB STORE_LIB
-checkexecs CPP_CLUSTER_EXEC PYTHON_CLUSTER_EXEC QPIDD_EXEC QPID_CONFIG_EXEC QPID_ROUTE_EXEC RECEIVER_EXEC SENDER_EXEC
+func_checkpaths PYTHONPATH TMP_DATA_DIR
+func_checklibs CLUSTER_LIB TEST_STORE_LIB STORE_LIB
+func_checkexecs CPP_CLUSTER_EXEC PYTHON_CLUSTER_EXEC QPIDD_EXEC QPID_CONFIG_EXEC QPID_ROUTE_EXEC RECEIVER_EXEC SENDER_EXEC
# Run the C++ cluster tests
if test ! ${LONG_TEST}; then
@@ -179,7 +189,7 @@
if python -c "import qpid" ; then
PYTHON_TESTS=python_tests
- FAILING_PYTHON_TESTS=${abs_srcdir}/failing_python_tests.txt
+ FAILING_PYTHON_TESTS="${abs_srcdir}/failing_python_tests.txt"
else
cat <<EOF
@@ -196,12 +206,12 @@
fi
#Make sure temp dir exists if this is the first to use it
-if ! test -d ${TMP_DATA_DIR} ; then
- mkdir -p ${TMP_DATA_DIR}/cluster
+if ! test -d "${TMP_DATA_DIR}" ; then
+ mkdir -p "${TMP_DATA_DIR}/cluster"
else
# Delete old cluster test dirs
- rm -rf ${TMP_DATA_DIR}/cluster
- mkdir -p ${TMP_DATA_DIR}/cluster
+ rm -rf "${TMP_DATA_DIR}/cluster"
+ mkdir -p "${TMP_DATA_DIR}/cluster"
fi
export TMP_DATA_DIR
15 years, 8 months
rhmessaging commits: r3509 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-07-17 14:22:09 -0400 (Fri, 17 Jul 2009)
New Revision: 3509
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Improvement to cluster test script interface for ptolemy
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-17 14:06:05 UTC (rev 3508)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-07-17 18:22:09 UTC (rev 3509)
@@ -21,6 +21,67 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
+# Check that an environment var is set (ie non-zero length)
+checkvar()
+{
+ local loc_VAR=$1
+ if test -z ${!loc_VAR}; then
+ echo "WARNING: environment variable ${loc_VAR} not set."
+ return 1
+ fi
+ return 0
+}
+
+# Check a list of paths (each can contain ':'-separated sub-list) is set and valid (ie each path exists as a dir)
+checkpaths()
+{
+ local loc_PATHS=$@
+ for path in ${loc_PATHS}; do
+ checkvar ${path}
+ if test $? == 0; then
+ local temp_IFS=${IFS}
+ IFS=":"
+ local pl=${!path}
+ for p in ${pl[@]}; do
+ if test ! -d ${p}; then
+ echo "WARNING: Directory ${p} in var ${path} not found."
+ fi
+ done
+ IFS=${temp_IFS}
+ fi
+ done
+}
+
+# Check that a list of libs is set and valid (ie each lib exists as an executable file)
+checklibs()
+{
+ local loc_LIBS=$@
+ for lib in ${loc_LIBS[@]}; do
+ checkvar ${lib}
+ if test $? == 0; then
+ if test ! -x ${!lib}; then
+ echo "WARNING: Library ${lib}=${!lib} not found."
+ fi
+ fi
+ done
+}
+
+# Check that a list of executable is set and valid (ie each exec exists as an executable file)
+checkexecs()
+{
+ local loc_EXECS=$@
+ for exec in ${loc_EXECS[@]}; do
+ checkvar ${exec}
+ if test $? == 0; then
+ if test ! -x ${!exec}; then
+ echo "WARNING: Executable ${exec}=${!exec} not found or is not executable."
+ fi
+ fi
+ done
+}
+
+#-----------------
+
srcdir=`dirname $0`
if test x$1 == x"LONG_TEST"; then
@@ -52,45 +113,62 @@
fi
# QPID_DIR is defined for source tree builds because of the --with-qpid-checkout config parameter
+# If set, then set all the env vars from the correct places in the svn source tree.
if test "${QPID_DIR}" -a -d ${QPID_DIR} ; then
- # Source tree path
- CLUSTER_DIR=${QPID_DIR}/cpp/src/tests
- CPP_CLUSTER_EXEC=cluster_test
+ # Paths and dirs
export PYTHONPATH=${QPID_DIR}/python:${abs_srcdir}
- export QPIDD_EXEC=${QPID_DIR}/cpp/src/qpidd
+
+ # Libraries
export CLUSTER_LIB=${QPID_DIR}/cpp/src/.libs/cluster.so
export TEST_STORE_LIB=${QPID_DIR}/cpp/src/tests/.libs/test_store.so
+
+ # Executables
+ CPP_CLUSTER_EXEC=${QPID_DIR}/cpp/src/tests/cluster_test
+ if test ${LONG_TEST}; then
+ PYTHON_CLUSTER_EXEC=${QPID_DIR}/cpp/src/tests/long_cluster_tests.py
+ else
+ PYTHON_CLUSTER_EXEC=${QPID_DIR}/cpp/src/tests/cluster_tests.py
+ fi
+ export QPIDD_EXEC=${QPID_DIR}/cpp/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_DIR}/cpp/src/tests/receiver
export SENDER_EXEC=${QPID_DIR}/cpp/src/tests/sender
else
- # Check expected environment vars are set
- VARS=(CLUSTER_DIR CPP_CLUSTER_EXEC PYTHONPATH QPIDD_EXEC CLUSTER_LIB TEST_STORE_LIB QPID_CONFIG_EXEC QPID_ROUTE_EXEC RECEIVER_EXEC SENDER_EXEC)
- for var in ${VARS[@]}; do
- if test -z ${!var}; then
- echo "WARNING: environment variable ${var} not set."
- fi
- done
- LIBS=(CLUSTER_LIB TEST_STORE_LIB)
- for lib in ${LIBS[@]}; do
- if test -x ${!lib}; then
- echo "WARNING: library \"${lib}\" not found."
- fi
- done
- EXECS=(QPIDD_EXEC QPID_CONFIG_EXEC QPID_ROUTE_EXEC RECEIVER_EXEC SENDER_EXEC)
- for exec in ${EXECS[@]}; do
- if test -x ${!exec}; then
- echo "WARNING: executable \"${exec}\" not found."
- fi
- done
+ # These four env vars must be set prior to calling this script
+ checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
+
+ # Paths and dirs
+ export PYTHONPATH=${QPID_LIB_DIR}/python:${QPID_LIB_DIR}/python2.4
+
+ # Libraries
+ export CLUSTER_LIB=${QPID_LIB_DIR}/cluster.so
+ export TEST_STORE_LIB=${QPID_LIB_DIR}/test_store.so
+
+ # Executables
+ CPP_CLUSTER_EXEC=${QPID_LIBEXEC_DIR}/cluster_test
+ if test ${LONG_TEST}; then
+ PYTHON_CLUSTER_EXEC=${QPID_LIBEXEC_DIR}/long_cluster_tests.py
+ else
+ PYTHON_CLUSTER_EXEC=${QPID_LIBEXEC_DIR}/cluster_tests.py
+ fi
+ 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}/receiver
+ export SENDER_EXEC=${QPID_LIBEXEC_DIR}/sender
fi
export STORE_LIB=${abs_srcdir}/../../lib/.libs/msgstore.so
-echo "Running C++ cluster tests..."
+# Check expected environment vars are set
+checkpaths PYTHONPATH
+checklibs CLUSTER_LIB TEST_STORE_LIB STORE_LIB
+checkexecs CPP_CLUSTER_EXEC PYTHON_CLUSTER_EXEC QPIDD_EXEC QPID_CONFIG_EXEC QPID_ROUTE_EXEC RECEIVER_EXEC SENDER_EXEC
+
# Run the C++ cluster tests
if test ! ${LONG_TEST}; then
- sg ais -c "${CLUSTER_DIR}/${CPP_CLUSTER_EXEC}"
+ echo "Running C++ cluster tests..."
+ sg ais -c "${CPP_CLUSTER_EXEC}"
RETCODE=$?
if test x${RETCODE} != x0; then
exit 1;
@@ -127,14 +205,8 @@
fi
export TMP_DATA_DIR
-if test ${LONG_TEST}; then
- PYTHON_CLUSTER_EXEC=long_cluster_tests.py
-else
- PYTHON_CLUSTER_EXEC=cluster_tests.py
-fi
-
echo "Running Python cluster tests..."
-sg ais -c "${CLUSTER_DIR}/${PYTHON_CLUSTER_EXEC} -v"
+sg ais -c "${PYTHON_CLUSTER_EXEC} -v"
RETCODE=$?
if test x${RETCODE} != x0; then
exit 1;
15 years, 8 months
rhmessaging commits: r3508 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-07-17 10:06:05 -0400 (Fri, 17 Jul 2009)
New Revision: 3508
Modified:
mgmt/trunk/wooly/python/wooly/forms.strings
Log:
Use mootools $(id) to set focus on ButtonForms
Modified: mgmt/trunk/wooly/python/wooly/forms.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/forms.strings 2009-07-16 22:27:09 UTC (rev 3507)
+++ mgmt/trunk/wooly/python/wooly/forms.strings 2009-07-17 14:06:05 UTC (rev 3508)
@@ -216,6 +216,6 @@
</form>
<script type="text/javascript">
//<![CDATA[
- wooly.doc().elembyid("{id}").node.elements[0].focus();
+ $("{id}").elements[0].focus();
//]]>
</script>
15 years, 8 months
rhmessaging commits: r3507 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-07-16 18:27:09 -0400 (Thu, 16 Jul 2009)
New Revision: 3507
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
Log:
Fix attribute error in get_stats
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2009-07-16 22:21:38 UTC (rev 3506)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2009-07-16 22:27:09 UTC (rev 3507)
@@ -1181,11 +1181,11 @@
return "text/plain"
def get_stats(self, session):
+ cls = self.class_.get(session)
return [getattr(cls, x) for x in self.stats.get(session)]
def do_render(self, session):
object = self.get_object(session)[0]
- cls = self.class_.get(session)
chart = self.chart_factory(self.chart_type.get(session))
return chart.create(session, object)
15 years, 8 months