#!/bin/bash
-#
-#set -vx
NFSVERSION=${1:-"3"}
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
. $LUSTRE/tests/test-framework.sh
# only call init_test_env if this script is called directly
if [[ -z "$TESTSUITE" || "$TESTSUITE" = "$(basename $0 .sh)" ]]; then
init_test_env $@
+else
+ . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
fi
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
init_logging
racer=$LUSTRE/tests/racer/racer.sh
NFS_CLIMNTPT=${NFS_CLIMNTPT:-$MOUNT}
[ -z "$NFS_CLIENTS" ] &&
- skip_env "need at least two nodes: nfs server and nfs client" && exit 0
+ skip_env "need at least two nodes: nfs server and nfs client"
[ "$NFSVERSION" = "4" ] && cl_mnt_opt="${MOUNT_OPTS:+$MOUNT_OPTS,}32bitapi" ||
cl_mnt_opt=""
FAIL_ON_ERROR=false
# common setup
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
clients=${NFS_CLIENTS:-$HOSTNAME}
generate_machine_file $clients $MACHINEFILE ||
error "Failed to generate machine file"