1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

tests: update tests, try running functional tests in travis

This commit is contained in:
Pavol Rusnak 2017-04-25 16:18:44 +02:00
parent 9587563c77
commit 87f20bac29
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 21 additions and 7 deletions

View File

@ -25,6 +25,7 @@ addons:
install:
- pip3 install ed25519 pyblake2
- pip2 install mnemonic protobuf requests
script:
- test "$GOAL" != "stm32" || test "$CC" != "gcc" || make vendorheader
@ -35,6 +36,7 @@ script:
- test "$GOAL" != "unix" || make build_unix TREZOR_NOUI=1
- test "$GOAL" != "unix" || make test
- test "$GOAL" != "unix" || make testpy
notifications:
webhooks:

View File

@ -1,21 +1,26 @@
#!/bin/bash
MICROPYTHON=../vendor/micropython/unix/micropython
results=()
error=0
if [ -z "$*" ]; then
list="test_*.py"
else
list="$*"
fi
for i in $list; do
echo
echo
if $MICROPYTHON $i; then
results+=("OK $i")
results+=("OK $i")
else
results+=("FAIL $i")
error=1
results+=("FAIL $i")
error=1
fi
done
echo
echo 'Summary:'
printf '%s\n' "${results[@]}"

View File

@ -59,13 +59,20 @@ for i in \
test_op_return.py \
test_zerosig.py \
; do
if ! $PYTHON $i ; then
error=1
break
if $PYTHON $i; then
results+=("OK $i")
else
results+=("FAIL $i")
error=1
fi
done
# kill emulator
kill $UPY_PID
echo
echo 'Summary:'
printf '%s\n' "${results[@]}"
exit $error