#!/bin/ksh
#
#pragma ident "@(#)tests8.tst	1.6      01/07/27 SMI"
# 
# Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
#
#
# Original Author: Michael Koller
# Modified by:	   Andrew McCarthy
#

# variables
hctsdir=SUNWhcts			# base directory
hname=$1			# test system
testcmd=tests/str/tape.stf	# tape test
prgdir=prgs			# program directory

# functions

# do function
go_fun()
{
	$prgdir/funcs "$*" 2>&1
}	

### MAIN ###

# change to base directory
cd `dirname $0`
while [ `basename $PWD` != $hctsdir ]
do
	cd ..
done

tapeid=`ls /dev/rmt/ | head -1`
tape=/dev/rmt/$tapeid
if [ -z "$tape" ]
then
	echo "!ERROR: No tape devices found on this system"
	exit 1
else
	echo "h:Default tape device = $tape:"
fi

echo "h:<HR><B><U>Storage tests - tape</U></B>:"
echo "X:4:$testcmd"
echo "T:Enter your tape device:$tape"
echo "x:5:"
go_fun runt 1 0 1 1
