1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00
trezor-firmware/script/test

25 lines
535 B
Plaintext
Raw Normal View History

2017-12-17 16:00:32 +00:00
#!/bin/bash
# script/test: Run test suite for application.
set -e
cd "$(dirname "$0")/.."
if [ \! -d device_tests ]; then
curl -s -L https://github.com/trezor/python-trezor/archive/master.tar.gz | tar -xvz --strip-components=2 python-trezor-master/tests/device_tests
fi
2017-12-17 16:00:32 +00:00
# Kill jobs on exit
trap "exit" INT TERM
trap "kill 0" EXIT
if [ "$EMULATOR" = 1 ] && [ -z "$(pidof trezor.elf)" ]; then
2017-12-17 16:00:32 +00:00
firmware/trezor.elf &
fi
TREZOR_TRANSPORT_V1=1 pytest "device_tests" &
2017-12-17 16:00:32 +00:00
# Wait for either job to exit and kill the other
wait -n