trezor-core/tests/run_tests.sh

35 lines
492 B
Bash
Raw Normal View History

#!/bin/bash
2017-08-07 03:41:00 -07:00
MICROPYTHON=../build/unix/micropython
PYOPT=1
results=()
2016-10-03 07:32:58 -07:00
error=0
if [ -z "$*" ]; then
list="test_*.py"
else
list="$*"
fi
for i in $list; do
echo
if $MICROPYTHON -O$PYOPT $i; then
results+=("OK $i")
else
results+=("FAIL $i")
error=1
fi
2016-04-12 09:09:23 -07:00
done
echo
echo 'Summary:'
printf '%s\n' "${results[@]}"
echo '-------------------'
if [ $error == 0 ]; then
echo 'ALL OK'
else
echo 'FAIL at least one error occurred'
fi
2016-10-03 07:32:58 -07:00
exit $error