2017-10-30 10:52:10 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-02-09 04:41:31 -08:00
|
|
|
MICROPYTHON=../build/unix/micropython
|
|
|
|
PYOPT=0
|
|
|
|
|
2017-10-30 10:52:10 -07:00
|
|
|
# run emulator
|
|
|
|
cd ../src
|
2018-02-09 04:41:31 -08:00
|
|
|
$MICROPYTHON -O$PYOPT main.py >/dev/null &
|
2017-10-30 10:52:10 -07:00
|
|
|
upy_pid=$!
|
|
|
|
sleep 1
|
|
|
|
|
|
|
|
# run tests
|
|
|
|
cd ../tests
|
2017-10-31 05:55:51 -07:00
|
|
|
error=0
|
2017-12-19 10:32:07 -08:00
|
|
|
if ! TREZOR_TRANSPORT_V1=0 pytest -k 'not skip_t2' --pyargs trezorlib.tests.device_tests ; then
|
2017-10-31 05:55:51 -07:00
|
|
|
error=1
|
|
|
|
fi
|
2017-12-19 10:32:07 -08:00
|
|
|
if ! TREZOR_TRANSPORT_V1=1 pytest -k 'not skip_t2' --pyargs trezorlib.tests.device_tests ; then
|
2017-10-31 05:55:51 -07:00
|
|
|
error=1
|
|
|
|
fi
|
2017-10-30 10:52:10 -07:00
|
|
|
kill $upy_pid
|
|
|
|
exit $error
|