mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
tests: ignore specific tests, testpy -> test_emu
This commit is contained in:
parent
431a711060
commit
f093ca23d5
@ -54,7 +54,7 @@ script:
|
|||||||
|
|
||||||
- test "$GOAL" != "unix" || make build_unix_noui
|
- test "$GOAL" != "unix" || make build_unix_noui
|
||||||
- test "$GOAL" != "unix" || make test
|
- test "$GOAL" != "unix" || make test
|
||||||
- test "$GOAL" != "unix" || make testpy
|
- test "$GOAL" != "unix" || make test_emu
|
||||||
|
|
||||||
# - test "$GOAL" != "src" || make style
|
# - test "$GOAL" != "src" || make style
|
||||||
|
|
||||||
|
4
Makefile
4
Makefile
@ -65,8 +65,8 @@ emu: ## run emulator
|
|||||||
test: ## run unit tests
|
test: ## run unit tests
|
||||||
cd tests ; ./run_tests.sh
|
cd tests ; ./run_tests.sh
|
||||||
|
|
||||||
testpy: ## run selected unit tests from python-trezor
|
test_emu: ## run selected device tests from python-trezor
|
||||||
cd tests ; ./run_tests_device.sh
|
cd tests ; ./run_tests_device_emu.sh
|
||||||
|
|
||||||
pylint: ## run pylint on application sources
|
pylint: ## run pylint on application sources
|
||||||
pylint -E $(shell find src -name *.py)
|
pylint -E $(shell find src -name *.py)
|
||||||
|
@ -4,70 +4,37 @@ 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
|
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
|
fi
|
||||||
|
|
||||||
# run emulator
|
cd device_tests
|
||||||
|
|
||||||
cd ../src
|
pytest \
|
||||||
../build/unix/micropython -O0 main.py >/dev/null &
|
-k-multisig \
|
||||||
UPY_PID=$!
|
--ignore test_bip32_speed.py \
|
||||||
|
--ignore test_debuglink.py \
|
||||||
sleep 1
|
--ignore test_msg_applysettings.py \
|
||||||
|
--ignore test_msg_changepin.py \
|
||||||
cd ../tests/device_tests
|
--ignore test_msg_clearsession.py \
|
||||||
|
--ignore test_msg_ethereum_signmessage.py \
|
||||||
error=0
|
--ignore test_msg_ethereum_signtx.py \
|
||||||
|
--ignore test_msg_ethereum_verifymessage.py \
|
||||||
: '
|
--ignore test_msg_getaddress_segwit_native.py \
|
||||||
not passing:
|
--ignore test_msg_getaddress_segwit.py \
|
||||||
|
--ignore test_msg_getaddress_show.py \
|
||||||
test_bip32_speed.py \
|
--ignore test_msg_loaddevice_xprv.py \
|
||||||
test_debuglink.py \
|
--ignore test_msg_loaddevice.py \
|
||||||
test_msg_applysettings.py \
|
--ignore test_msg_nem_getaddress.py \
|
||||||
test_msg_clearsession.py \
|
--ignore test_msg_nem_signtx.py \
|
||||||
test_msg_changepin.py \
|
--ignore test_msg_ping.py \
|
||||||
test_msg_ethereum_signtx.py \
|
--ignore test_msg_recoverydevice_dryrun.py \
|
||||||
test_msg_getaddress_show.py \
|
--ignore test_msg_recoverydevice.py \
|
||||||
test_msg_loaddevice_xprv.py \
|
--ignore test_msg_resetdevice_skipbackup.py \
|
||||||
test_msg_ping.py \
|
--ignore test_msg_resetdevice.py \
|
||||||
test_msg_resetdevice.py \
|
--ignore test_msg_signmessage_segwit.py \
|
||||||
test_msg_recoverydevice.py \
|
--ignore test_msg_signtx_bch.py \
|
||||||
test_msg_signtx_segwit.py \
|
--ignore test_msg_signtx_segwit_native.py \
|
||||||
test_msg_signtx_zcash.py \
|
--ignore test_msg_signtx_segwit.py \
|
||||||
test_multisig_change.py \
|
--ignore test_msg_signtx_zcash.py \
|
||||||
test_multisig.py \
|
--ignore test_msg_verifymessage_segwit.py \
|
||||||
test_protect_call.py \
|
--ignore test_multisig_change.py \
|
||||||
test_protection_levels.py \
|
--ignore test_multisig.py \
|
||||||
'
|
--ignore test_protect_call.py \
|
||||||
|
--ignore test_protection_levels.py
|
||||||
for i in \
|
|
||||||
test_basic.py \
|
|
||||||
test_msg_cipherkeyvalue.py \
|
|
||||||
test_msg_ethereum_getaddress.py \
|
|
||||||
test_msg_getaddress.py \
|
|
||||||
test_msg_getentropy.py \
|
|
||||||
test_msg_getpublickey.py \
|
|
||||||
test_msg_loaddevice.py \
|
|
||||||
test_msg_signidentity.py \
|
|
||||||
test_msg_signmessage.py \
|
|
||||||
test_msg_signtx.py \
|
|
||||||
test_msg_verifymessage.py \
|
|
||||||
test_msg_wipedevice.py \
|
|
||||||
test_op_return.py \
|
|
||||||
test_zerosig.py \
|
|
||||||
; do
|
|
||||||
|
|
||||||
if pytest -k-multisig -q $i ; then
|
|
||||||
results+=("OK $i")
|
|
||||||
else
|
|
||||||
results+=("FAIL $i")
|
|
||||||
error=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
# kill emulator
|
|
||||||
kill $UPY_PID
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo 'Summary:'
|
|
||||||
printf '%s\n' "${results[@]}"
|
|
||||||
exit $error
|
|
||||||
|
15
tests/run_tests_device_emu.sh
Executable file
15
tests/run_tests_device_emu.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# run emulator
|
||||||
|
cd ../src
|
||||||
|
../build/unix/micropython -O0 main.py >/dev/null &
|
||||||
|
upy_pid=$!
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
# run tests
|
||||||
|
cd ../tests
|
||||||
|
TREZOR_TRANSPORT_V1=0 ./run_tests_device.sh
|
||||||
|
error=$?
|
||||||
|
|
||||||
|
kill $upy_pid
|
||||||
|
exit $error
|
Loading…
Reference in New Issue
Block a user