Add lli support for running example test cases #327
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Requires at least one argument"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
demo="${@:-1}"
|
||||||
|
set -- "${@:1:$(($# - 1))}"
|
||||||
|
|
||||||
|
echo -n "Checking $demo... "
|
||||||
|
./interpret_demo.py "$demo" > interpreted.log
|
||||||
|
./run_demo.sh "$@" "$demo" > run.log
|
||||||
|
diff -Nau interpreted.log run.log
|
||||||
|
echo "ok"
|
|
@ -4,12 +4,8 @@ set -e
|
||||||
|
|
||||||
count=0
|
count=0
|
||||||
for demo in src/*.py; do
|
for demo in src/*.py; do
|
||||||
echo -n "checking $demo... "
|
./check_demo.sh "$@" "$demo"
|
||||||
./interpret_demo.py $demo > interpreted.log
|
((count += 1))
|
||||||
./run_demo.sh "$@" $demo > run.log
|
|
||||||
diff -Nau interpreted.log run.log
|
|
||||||
derppening marked this conversation as resolved
Outdated
|
|||||||
echo "ok"
|
|
||||||
let "count+=1"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Ran $count demo checks - PASSED"
|
echo "Ran $count demo checks - PASSED"
|
||||||
|
|
Loading…
Reference in New Issue
Just add a
run_demo_lli.sh > run_lli.log
and keep this structure, which avoids invoking the interpreter multiple times and overwriting files.