X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Frpc.sh;h=bbe9337414b35df8f48f690d3aae79365fd02815;hb=c28933602a6971739cb5ec3a1e920409ff19b01e;hp=11c518132e34e71543b9af2560a7b4b964cc67ce;hpb=3c42a7fca2a101298be18733564e92549b35ef95;p=fs%2Flustre-release.git diff --git a/lustre/tests/rpc.sh b/lustre/tests/rpc.sh index 11c5181..bbe9337 100755 --- a/lustre/tests/rpc.sh +++ b/lustre/tests/rpc.sh @@ -3,12 +3,18 @@ export PATH=`dirname $0`/../utils:$PATH NAME=${NAME:-local} LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} + +if [ ! -f $LUSTRE/tests/rpc.sh ]; then + LUSTRE=$(cd $(dirname $(which $0))/..; echo $PWD) +fi + . $LUSTRE/tests/test-framework.sh -init_test_env $@ +RPC_MODE=true init_test_env . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} -cmd=$1 -shift -$cmd $@ +# Reset the trap on ERR set by the framework. Noticing this failure is the +# framework's job. +trap - ERR -exit $? +# Execute the command +"$@"