standalone: Split check_demos into check_demo
Allows individual tests to be executed.
This commit is contained in:
parent
be3e8f50a2
commit
b6afd1bfda
|
@ -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
|
||||
for demo in src/*.py; do
|
||||
echo -n "checking $demo... "
|
||||
./interpret_demo.py $demo > interpreted.log
|
||||
./run_demo.sh "$@" $demo > run.log
|
||||
diff -Nau interpreted.log run.log
|
||||
echo "ok"
|
||||
let "count+=1"
|
||||
./check_demo.sh "$@" "$demo"
|
||||
((count += 1))
|
||||
done
|
||||
|
||||
echo "Ran $count demo checks - PASSED"
|
||||
|
|
Loading…
Reference in New Issue