cantera/test_problems/cathermo/HMW_graph_GvI/runtest
2006-07-06 21:13:39 +00:00

60 lines
1.5 KiB
Bash
Executable file

#!/bin/sh
#
#
temp_success="0"
/bin/rm -f output.txt outputa.txt
##########################################################################
prog=HMW_graph_GvI
if test ! -x $prog ; then
echo $prog ' does not exist'
exit -1
fi
##########################################################################
/bin/rm -f test.out test.diff output.txt
/bin/rm -f test.out test.diff T298.csv T523.csv
#################################################################
#
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
CANTERA_BIN=${CANTERA_BIN:=../../../bin}
#################################################################
$prog > output.txt
retnStat=$?
if [ $retnStat != "0" ]
then
temp_success="1"
echo "$prog returned with bad status, $retnStat, check output"
fi
echo 'Making a comparison with the good saved solution: '
echo '--------------------------------------------------------------------------------'
diff T298.csv T298_blessed.csv > test.diff
zres=$?
cat test.diff
diff T523.csv T523_blessed.csv > test2.diff
zres2=$?
cat test2.diff
echo '--------------------------------------------------------------------------------'
echo 'End of comparison'
if test "$zres" = "0" ; then
if test "$zres2" = "0" ; then
echo 'test passed'
else
echo 'test 1 passed, test 2 failed'
temp_success="1"
fi
else
echo 'test 1 failed'
temp_success="1"
fi
if [ $temp_success = "0" ]
then
echo "successful diff comparison on $prog test"
else
echo "unsuccessful diff comparison on $prog test"
echo "FAILED" > csvCode.txt
fi