mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
script: Refactor test
This commit is contained in:
parent
bab8db9191
commit
7aadc1edda
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
.cache/
|
||||||
_attic/
|
_attic/
|
||||||
build/
|
build/
|
||||||
*.o
|
*.o
|
||||||
|
15
script/test
15
script/test
@ -6,19 +6,10 @@ set -e
|
|||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
if [ \! -d device_tests ]; then
|
if [ "$EMULATOR" = 1 ]; 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
|
trap "kill %1" EXIT
|
||||||
fi
|
|
||||||
|
|
||||||
# Kill jobs on exit
|
|
||||||
trap "exit" INT TERM
|
|
||||||
trap "kill 0" EXIT
|
|
||||||
|
|
||||||
if [ "$EMULATOR" = 1 ] && [ -z "$(pidof trezor.elf)" ]; then
|
|
||||||
firmware/trezor.elf &
|
firmware/trezor.elf &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TREZOR_TRANSPORT_V1=1 pytest "device_tests" &
|
TREZOR_TRANSPORT_V1=1 "${PYTHON:-python}" -m pytest --pyarg trezorlib.tests.device_tests "$@"
|
||||||
|
|
||||||
# Wait for either job to exit and kill the other
|
|
||||||
wait -n
|
|
||||||
|
Loading…
Reference in New Issue
Block a user