2014-06-29 07:51:09 -07:00
|
|
|
#!/usr/bin/env bash
|
2013-11-18 18:02:12 -05:00
|
|
|
if [ $# -ne 2 ]; then
|
2014-06-29 07:51:09 -07:00
|
|
|
echo "Usage: test_single.sh [lean-executable-path] [file]"
|
2013-11-18 18:02:12 -05:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
ulimit -s unlimited
|
2013-11-19 16:47:47 -08:00
|
|
|
LEAN=$1
|
2013-11-18 18:02:12 -05:00
|
|
|
f=$2
|
|
|
|
echo "-- testing $f"
|
2015-03-28 23:29:52 -04:00
|
|
|
if "$LEAN" extra.lua "$f" > "$f.produced.out"; then
|
2013-11-18 18:02:12 -05:00
|
|
|
echo "-- worked"
|
|
|
|
exit 0
|
|
|
|
else
|
2013-11-18 15:39:55 -08:00
|
|
|
echo "ERROR executing $f, produced output:"
|
2015-03-28 23:29:52 -04:00
|
|
|
cat "$f.produced.out"
|
2013-11-18 18:02:12 -05:00
|
|
|
exit 1
|
|
|
|
fi
|