56 lines
1.2 KiB
Bash
Executable file
56 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
#
|
|
#
|
|
temp_success="1"
|
|
/bin/rm -f output_0.txt diff_csv.txt diff_out_0.txt output_1.txt \
|
|
item0.txt itemp1.txt
|
|
|
|
##########################################################################
|
|
prog=simple.py
|
|
if test ! -f $prog ; then
|
|
echo $prog ' does not exist'
|
|
exit -1
|
|
fi
|
|
#################################################################
|
|
#
|
|
CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA
|
|
CANTERA_BIN=${CANTERA_BIN:=../../../../bin}
|
|
|
|
#################################################################
|
|
|
|
$PYTHON_CMD $prog > output_0.txt <<+
|
|
1.0
|
|
+
|
|
retnStat=$?
|
|
if [ $retnStat != "0" ]
|
|
then
|
|
temp_success="0"
|
|
echo "$prog returned with bad status, $retnStat, check output"
|
|
fi
|
|
|
|
$CANTERA_BIN/exp3to2.sh output_0.txt > itemp0.txt
|
|
cat itemp0.txt | tr -d '\015' | cat > itemp1.txt
|
|
/bin/rm itemp0.txt
|
|
/bin/mv itemp1.txt output_1.txt
|
|
|
|
|
|
|
|
diff -w output_blessed_0.txt output_1.txt > diff_out_0.txt
|
|
retnStat_0=$?
|
|
|
|
|
|
retnTotal=1
|
|
if test $retnStat_0 = "0"
|
|
then
|
|
retnTotal=0
|
|
fi
|
|
|
|
|
|
if test $retnTotal = "0"
|
|
then
|
|
echo "Successful test comparison on "`pwd`
|
|
else
|
|
echo "Unsuccessful test comparison on "`pwd` " test"
|
|
echo " files are different - see diff_out_0.txt"
|
|
fi
|
|
|