2017-10-30 17:52:10 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-02-09 12:41:31 +00:00
|
|
|
MICROPYTHON=../build/unix/micropython
|
|
|
|
PYOPT=0
|
|
|
|
|
2017-10-30 17:52:10 +00:00
|
|
|
# run emulator
|
|
|
|
cd ../src
|
2018-02-09 12:41:31 +00:00
|
|
|
$MICROPYTHON -O$PYOPT main.py >/dev/null &
|
2017-10-30 17:52:10 +00:00
|
|
|
upy_pid=$!
|
|
|
|
sleep 1
|
|
|
|
|
2018-03-09 13:56:37 +00:00
|
|
|
export TREZOR_PATH=udp:127.0.0.1:21324
|
|
|
|
|
2017-10-30 17:52:10 +00:00
|
|
|
# run tests
|
2018-11-19 16:57:28 +00:00
|
|
|
cd ..
|
2017-10-31 12:55:51 +00:00
|
|
|
error=0
|
2018-07-04 12:32:17 +00:00
|
|
|
if ! pytest "$@"; then
|
2017-10-31 12:55:51 +00:00
|
|
|
error=1
|
|
|
|
fi
|
2017-10-30 17:52:10 +00:00
|
|
|
kill $upy_pid
|
|
|
|
exit $error
|