2016-09-24 11:11:06 +00:00
|
|
|
#!/bin/bash
|
2016-11-08 18:04:59 +00:00
|
|
|
MICROPYTHON=../vendor/micropython/unix/micropython
|
2016-09-24 11:11:06 +00:00
|
|
|
results=()
|
2016-10-03 14:32:58 +00:00
|
|
|
error=0
|
2016-11-06 00:49:55 +00:00
|
|
|
if [ -z "$*" ]; then
|
2016-10-04 16:53:32 +00:00
|
|
|
list="test_*.py"
|
|
|
|
else
|
2016-11-06 00:49:55 +00:00
|
|
|
list="$*"
|
2016-10-04 16:53:32 +00:00
|
|
|
fi
|
|
|
|
for i in $list; do
|
2016-04-12 16:09:23 +00:00
|
|
|
echo
|
2016-11-08 18:04:59 +00:00
|
|
|
if $MICROPYTHON $i; then
|
2016-09-24 11:11:06 +00:00
|
|
|
results+=("OK $i")
|
|
|
|
else
|
|
|
|
results+=("FAIL $i")
|
2016-10-03 14:32:58 +00:00
|
|
|
error=1
|
2016-09-24 11:11:06 +00:00
|
|
|
fi
|
2016-04-12 16:09:23 +00:00
|
|
|
done
|
2016-09-24 11:11:06 +00:00
|
|
|
echo
|
|
|
|
echo 'Summary:'
|
|
|
|
printf '%s\n' "${results[@]}"
|
2016-10-03 14:32:58 +00:00
|
|
|
exit $error
|