lean2/tests/lua/test.sh
Leonardo de Moura a339a53f50 feat(util/options): 'verbose' as a system option, add -q (quiet) option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-09 15:31:58 -08:00

24 lines
524 B
Bash
Executable file

#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: test.sh [lean-executable-path]"
exit 1
fi
ulimit -s unlimited
LEAN=$1
NUM_ERRORS=0
for f in `ls *.lua`; do
echo "-- testing $f"
if $LEAN -t extra.lua $f > $f.produced.out; then
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