2013-11-05 21:11:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
if [ $# -ne 1 ]; then
|
2013-11-20 00:47:47 +00:00
|
|
|
echo "Usage: test.sh [lean-executable-path]"
|
2013-11-05 21:11:34 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ulimit -s unlimited
|
2013-11-20 00:47:47 +00:00
|
|
|
LEAN=$1
|
2013-11-05 21:11:34 +00:00
|
|
|
NUM_ERRORS=0
|
|
|
|
for f in `ls *.lua`; do
|
|
|
|
echo "-- testing $f"
|
2013-11-20 00:47:47 +00:00
|
|
|
if $LEAN util.lua $f > $f.produced.out; then
|
2013-11-05 21:11:34 +00:00
|
|
|
echo "-- worked"
|
|
|
|
else
|
|
|
|
echo "ERROR executing $f, produced output is at $f.produced.out"
|
|
|
|
NUM_ERRORS=$(($NUM_ERRORS+1))
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ $NUM_ERRORS -gt 0 ]; then
|
|
|
|
echo "-- Number of errors: $NUM_ERRORS"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "-- Passed"
|
|
|
|
exit 0
|
|
|
|
fi
|