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