diff options
Diffstat (limited to 'cpp/src')
-rwxr-xr-x | cpp/src/tests/run_failover_soak | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cpp/src/tests/run_failover_soak b/cpp/src/tests/run_failover_soak index d332cd42b9..5c168c76f2 100755 --- a/cpp/src/tests/run_failover_soak +++ b/cpp/src/tests/run_failover_soak @@ -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=.. |