Author: gsim
Date: Thu Nov 27 12:54:42 2008
New Revision: 721275

URL: http://svn.apache.org/viewvc?rev=721275&view=rev
Log:
QPID-1485: check required group is set etc when running failover test (patch 
from [EMAIL PROTECTED]).


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

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/run_failover_soak
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/run_failover_soak?rev=721275&r1=721274&r2=721275&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/run_failover_soak (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/run_failover_soak Thu Nov 27 
12:54:42 2008
@@ -1,5 +1,29 @@
 #!/bin/sh
 
+# Check AIS requirements and run tests if found.
+id -ng | grep '\<ais\>' >/dev/null || \
+    NOGROUP="The ais group is not your primary group."
+ps -u root | grep aisexec >/dev/null || \
+    NOAISEXEC="The aisexec 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
+    exit 0;                     # A warning, not a failure.
+fi
+
+
 host=127.0.0.1
 
 src_root=..


Reply via email to