summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ais_check
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-10-05 15:08:25 +0000
committerAlan Conway <aconway@apache.org>2009-10-05 15:08:25 +0000
commit8ce9685df2740db53676d1bdc17329507ddb747d (patch)
tree8231ed62780c32d3add3addcbe4cb93ac8ded240 /qpid/cpp/src/tests/ais_check
parent382459758bcb7366e07c3cae4e154128f0a66bb1 (diff)
downloadqpid-python-8ce9685df2740db53676d1bdc17329507ddb747d.tar.gz
Fixed: cluster udpate did not presever deliver-properties.exchange on messages.
Also minor improvements: - Improved debug logging for consumers. - Cluster tests scripts work with latest corosync: don't check/set ais group. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@821830 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ais_check')
-rwxr-xr-xqpid/cpp/src/tests/ais_check29
1 files changed, 7 insertions, 22 deletions
diff --git a/qpid/cpp/src/tests/ais_check b/qpid/cpp/src/tests/ais_check
index d76c518808..1481cf5bab 100755
--- a/qpid/cpp/src/tests/ais_check
+++ b/qpid/cpp/src/tests/ais_check
@@ -21,29 +21,14 @@
srcdir=`dirname $0`
# Check AIS requirements and run tests if found.
-id -nG | grep '\<ais\>' >/dev/null || \
- NOGROUP="You are not a member of the ais group."
-ps -u root | grep 'aisexec\|corosync' >/dev/null || \
- NOAISEXEC="The aisexec or corosync daemon is not running as root"
-
-if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
- cat <<EOF
-
- =========== WARNING: NOT RUNNING AIS TESTS ==============
-
- Tests that depend on the openais library (used for clustering)
- will not be run because:
- $NOGROUP
- $NOAISEXEC
-
- ==========================================================
-
-EOF
+ps -u root | grep 'aisexec\|corosync' >/dev/null || {
+ echo WARNING: Skipping cluster tests, the aisexec or corosync daemon is not running.
exit 0; # A warning, not a failure.
-fi
+}
-# Execute command with the ais group set.
+# Execute command with the ais group set if user is a member.
with_ais_group() {
- id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group."; exit 1; }
- echo $* | newgrp ais
+ if id -nG | grep '\<ais\>' >/dev/null; then sg -c "$*"
+ else "$@"
+ fi
}