# unset environtment variables defined by the make command,
# because these may make some tests fail.
unset MAKEFLAGS MFLAGS

# exit code
exit_pass=0
exit_fail=1
exit_xpass=2			# passed, but it's unexpected. fixed recently?
exit_xfail=3			# failed, but it's expected. i.e. known bug.
exit_unresolved=4		# cannot determine whether (X)?PASS or (X)?FAIL
exit_untested=5			# not tested, this test haven't written yet.
exit_unsupported=6		# not tested, this environment can't test this.
exit_trap=7			# killed by Control-C or something
exit_code=$exit_fail

if [ -x /usr/bin/nawk ]; then
	awk=nawk
else
	awk=awk
fi

# regress framework directories
: ${regress:=.}
data=$regress/data
testbase=`dirname $0`
localtop=/tmp
localtmp=${localtop}/RT$$
if [ X"$regress" = X"." ]; then
	testbin=$testbase
else
	testbin=`$awk 'BEGIN {
		regress="'"$regress"'"
		testbase="'"$testbase"'"
		if (substr(testbase, 1, length(regress)) == regress)
			print substr(testbase, length(regress) + 2)
		else
			print testbase # XXX?
		exit 0
	}'`
fi

# work directory on gfarm filesystem
gftop=/tmp
gftmp=$gftop/`hostname`."`echo $0 | sed s:/:_:g`".$$

case ${GFARM_TEST_DEBUG+set} in
set)	shell="$shell -x";;
esac

# miscellaneous
trap_sigs='1 2 15'
