X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftests%2Frpc.sh;h=098df10be67080cfa7dfe03f96ec3145749eed32;hb=f7b585e7220e2b1c510ac7778f31f3ef99ac6c30;hp=11c518132e34e71543b9af2560a7b4b964cc67ce;hpb=3c42a7fca2a101298be18733564e92549b35ef95;p=fs%2Flustre-release.git diff --git a/lustre/tests/rpc.sh b/lustre/tests/rpc.sh index 11c5181..098df10 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 $@ +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 +"$@"