#!/bin/sh
EXECSTRING=`pwd`/src/Xyce
cd Xyce_Test/TestScripts
perl ./tvr_test_serial $EXECSTRING
EXITSTAT=$?
echo "perl script returned $EXITSTAT"
if [ $EXITSTAT != 0 ]
then
  if [ $EXITSTAT = 255 ]
  then
    echo "Too many failures for exit code scheme to work"
  fi
  if [ $EXITSTAT -le 15 ]
  then
    echo $EXITSTAT tests failed
  else
    NBOMB=`echo $EXITSTAT/16 | bc`
    NFAIL=`echo $EXITSTAT-$NBOMB*16|bc`
    echo $NFAIL tests failed, $NBOMB tests exited with error
  fi
fi
exit $EXITSTAT

