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
|
|
|
|
cd ../tests
|
2017-10-31 12:55:51 +00:00
|
|
|
error=0
|
2018-05-21 16:22:06 +00:00
|
|
|
if ! pytest -c ../pytest.ini "$@"; 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
|