#! /bin/sh
# This is a script for running the RIFELX tests below
#
# slow0: NEW /NEW /NEW  w/ seed 75249
# slow1; FILE/FILE/NONE w/ seed    21
# slow2; FILE/FILE/FILE w/ seed    21
# slow3; FILE/NEW /NONE w/ seed    21
# slow4; NEW /NEW /FILE w/ seed 75249
#
# slow0, slow1 and slow3 should give the same results
# slow2 and slow4        should give the same results
#
#   Org. version : Elizabeth Passano 00-03-29
#   Last modified:
#   2008-11-11 / EP  - Add aliases for release and debug versions 
#

if [ $# -lt 1 ]
then
   echo "Usage:  `basename $0` runscript"
   echo "        `basename $0` R[elease] run with ../../Release/bin/vriflex"
   echo "        `basename $0` D[ebug]   run with   ../../Debug/bin/vriflex"
   exit 1
fi

riflex=$1
if   [ -n "`echo 'Release' | grep "^$riflex"`" ] 
then
   riflex="../../Release/bin/vriflex"
elif [ -n "`echo 'Debug' | grep "^$riflex"`" ] 
then
   riflex="../../Debug/bin/vriflex"
fi

if   [ ! -f $riflex -o ! -x $riflex ]
then
   echo "Script $riflex not found"
   exit 2
fi

logfile=`basename $0`.out
logfile=`echo $logfile | sed s/\.run/''/g`
rm -f $logfile

echo "Starting tests using script $riflex to run riflex"
echo

# delete old resulrs
rm -f *_???mod.res
rm -f *_if[nr]???.???

$riflex inpmod slow >>$logfile
$riflex stamod slow >>$logfile


echo "slow0..."
$riflex dynmod slow slow0 >>$logfile

echo "slow|..."
$riflex dynmod slow slow1 >>$logfile

echo "slow2..."
$riflex dynmod slow slow2 >>$logfile

echo "slow3..."
$riflex dynmod slow slow3 >>$logfile

echo "slow4..."
$riflex dynmod slow slow4 >>$logfile

rm -f *sam *raf *ffi

echo 
echo "Run of tests using script $riflex completed"
