2016-09-24 11:11:06 +00:00
|
|
|
#!/bin/bash
|
2017-04-25 14:18:44 +00:00
|
|
|
|
2017-08-07 10:41:00 +00:00
|
|
|
MICROPYTHON=../build/unix/micropython
|
2017-04-25 14:18:44 +00:00
|
|
|
|
2016-09-24 11:11:06 +00:00
|
|
|
results=()
|
2016-10-03 14:32:58 +00:00
|
|
|
error=0
|
2017-04-25 14:18:44 +00:00
|
|
|
|
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
|
2017-04-25 14:18:44 +00:00
|
|
|
|
2016-10-04 16:53:32 +00:00
|
|
|
for i in $list; do
|
2017-04-25 14:18:44 +00:00
|
|
|
echo
|
2016-11-08 18:04:59 +00:00
|
|
|
if $MICROPYTHON $i; then
|
2017-04-25 14:18:44 +00:00
|
|
|
results+=("OK $i")
|
2016-09-24 11:11:06 +00:00
|
|
|
else
|
2017-04-25 14:18:44 +00:00
|
|
|
results+=("FAIL $i")
|
|
|
|
error=1
|
2016-09-24 11:11:06 +00:00
|
|
|
fi
|
2016-04-12 16:09:23 +00:00
|
|
|
done
|
2017-04-25 14:18:44 +00:00
|
|
|
|
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
|