diff options
Diffstat (limited to 'qpid/cpp/src/tests/ais_check')
-rwxr-xr-x | qpid/cpp/src/tests/ais_check | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/ais_check b/qpid/cpp/src/tests/ais_check new file mode 100755 index 0000000000..ae0edf88c1 --- /dev/null +++ b/qpid/cpp/src/tests/ais_check @@ -0,0 +1,27 @@ +#!/bin/sh +# Check for requirements, run AIS tests if found. +# + +id -nG | grep '\<ais\>' || \ + NOGROUP="You are not a member of the ais 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 + +echo ./ais_run | newgrp ais |