#!/bin/sh 

make -s realclean

echo '---running (perl) id script'
make -s run 1>/dev/null 2>&1 
result=`grep OKAY id.log 2>/dev/null`
if [ "$result" = "" ]; then
   echo "   ERROR"
else   
   echo "   PASSED"
fi

echo '---running (perl) id script, expected failure'
make -s bad 1>/dev/null 2>&1
result=`grep "Id creation from filename failed" id2.log 2>/dev/null`
if [ "$result" = "" ]; then
   echo "   ERROR"
else   
   echo "   PASSED"
fi

echo '---running (perl) prover script, expected failure'
make -s prove 1>/dev/null 2>&1
result=`grep "YAP query failed" prover.log 2>/dev/null`
if [ "$result" = "" ]; then
   echo "   ERROR"
else   
   echo "   PASSED"
fi
