1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +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: install:
- pip3 install ed25519 pyblake2 - pip3 install ed25519 pyblake2
- pip2 install mnemonic protobuf requests
script: script:
- test "$GOAL" != "stm32" || test "$CC" != "gcc" || make vendorheader - 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 build_unix TREZOR_NOUI=1
- test "$GOAL" != "unix" || make test - test "$GOAL" != "unix" || make test
- test "$GOAL" != "unix" || make testpy
notifications: notifications:
webhooks: webhooks:

View File

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

View File

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