diff options
Diffstat (limited to 'cpp/src/tests/ais_check')
| -rwxr-xr-x | cpp/src/tests/ais_check | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cpp/src/tests/ais_check b/cpp/src/tests/ais_check index f16480b7f0..e2d53b5870 100755 --- a/cpp/src/tests/ais_check +++ b/cpp/src/tests/ais_check @@ -23,11 +23,14 @@ EOF exit 0; # A warning, not a failure. fi +# Execute command with the ais group set. +with_ais_group() { + id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group."; exit 1; } + echo $* | newgrp ais +} + # Run the tests srcdir=`dirname $0` -$srcdir/start_cluster 4 -./ais_test -ret=$? -$srcdir/stop_cluster -exit $ret +with_ais_group ./cluster_test || ERROR=1 +exit $ERROR |
