#!/bin/sh

# The input arguments to this script are set up in 
# Xyce_Test/TestScripts/tsc_run_test_suite and are as follows:
# $1 = location of Xyce binary
# $2 = location of xyce_verify.pl script
# $3 = location of compare script 
# $4 = location of circuit file to test
# $5 = location of gold standard prn file

# If Xyce does not produce a prn file, then we return exit code 10.
# If Xyce succeeds, but the test fails, then we return exit code 2.
# If the shell script fails for some reason, then we return exit code 1.
# Otherwise we return the exit code of compare or xyce_verify.pl

XYCE=$1
CIRFILE=$4
GOLDPRN=$5

$XYCE -info  > info  2> $CIRFILE.err

# This test passes if Xyce exits without errors.
if [ "$?" -ne "0" ]; then
  echo "Exit code = 10"
  exit 10
fi
echo "Exit code = 0"
exit 0

