mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-20 21:38:26 +00:00
35 lines
492 B
Bash
Executable File
35 lines
492 B
Bash
Executable File
#!/bin/bash
|
|
|
|
MICROPYTHON=../build/unix/micropython
|
|
PYOPT=1
|
|
|
|
results=()
|
|
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
|
|
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
|
|
exit $error
|