mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
25 lines
535 B
Bash
Executable File
25 lines
535 B
Bash
Executable File
#!/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
|
|
|
|
# Kill jobs on exit
|
|
trap "exit" INT TERM
|
|
trap "kill 0" EXIT
|
|
|
|
if [ "$EMULATOR" = 1 ] && [ -z "$(pidof trezor.elf)" ]; then
|
|
firmware/trezor.elf &
|
|
fi
|
|
|
|
TREZOR_TRANSPORT_V1=1 pytest "device_tests" &
|
|
|
|
# Wait for either job to exit and kill the other
|
|
wait -n
|