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