:
if test "$EMPRESSPATH" = "" 
then
	echo "EMPRESSPATH not set"
	exit 1

elif test ! -d $EMPRESSPATH
then
	echo "invalid EMPRESSPATH"
	exit 1
elif test ! -d $EMPRESSPATH/rdbms
then
	echo "EMPRESSPATH/rdbms not found"
	exit 1
fi

MSNETSERVERCONFIGFILE=./netserver.cfg
export MSNETSERVERCONFIGFILE

MSUSERAUTHCONFIGFILE=./userauth.cfg
export MSUSERAUTHCONFIGFILE


SYSTEM=`uname -a`

case $SYSTEM in
 *Win*)
	# Update PATH for *.dll location.
	PATH="$EMPRESSPATH/bin;$PATH"
	export PATH
	;;
esac


$EMPRESSPATH/bin/empsvadm empodbcsv stop
test -d testdb && $EMPRESSPATH/bin/emprmdb testdb
test -f empodbcsv.log && rm empodbcsv.log

case "$SYSTEM" in
  *Win*)
	echo "Restoring Registry after testing..."
	$EMPRESSPATH/odbccl/local/win32/regCleanUp "`pwd`"
	echo "Done"
	;;
esac

