1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-14 03:49:25 +00:00
trezor-firmware/trezorlib/tests/device_tests
matejcik af98a4071a device_tests: allow custom runxfail
We can now selectively runxfail certain tests. This is useful for
accepting PRs into trezor-core:

1. trezor-core is going to get a pytest.ini that sets xfail_strict.
   That means that if an `xfail`ed test actually passes, that will
   break the test suite. So it will be visible when we implement
   a feature for which tests exist.
2. To allow PRs to pass the test suite without touching python-trezor
   directly, we add a new pytest.ini option: run_xfail.
   This adds a list of markers which will ignore `xfail`.
   So:
   2.1 First, the python-trezor PR marks the tests with the name
       of the feature. This commit already does that: Lisk tests
       are marked `@pytest.mark.lisk`, NEMs are `@pytest.mark.nem`,
       etc.
       The tests will be also marked with `xfail`, because the
       feature is not in core yet.
   2.2 Then, the trezor-core PR implements the feature, which makes
       the `xfail`ed tests pass. That breaks the test suite.
   2.3 To fix the test suite, the core PR also adds a `run_xfail`
       to `pytest.ini`: `run_xfail = lisk`.
       (it can take a list: `run_xfail = lisk nem stellar`)
       That will make the test suite behave as if the tests are not
       `xfail`ed. If the feature is implemented correctly, the tests
       will pass.
   2.4 When the PR is accepted to core, the next step should be
       a PR to python-trezor that removes the `xfail`s. After that,
       we should also remove the `run_xfail` option, just to be tidy.
2018-05-22 17:29:03 +02:00
..
__init__.py tests: Move to trezorlib.tests 2017-12-19 13:16:22 +01:00
.gitignore tests: Move to trezorlib.tests 2017-12-19 13:16:22 +01:00
common.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
conftest.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_basic.py tests: revert basic tests 2018-03-01 00:07:27 +01:00
test_bip32_speed.py tests: disable TestBip32Speed::test_cache on t2 2018-03-05 15:49:04 +01:00
test_cosi.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_debuglink.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_applysettings.py tests: add device test for auto-lock delay 2018-04-11 11:17:17 +02:00
test_msg_changepin.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_cipherkeyvalue.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_clearsession.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_ethereum_getaddress.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_ethereum_signmessage.py tests: ethereum sign/verify is skipped (#224) 2018-03-02 16:37:34 +01:00
test_msg_ethereum_signtx.py tests/device/eth: known/unknown token test 2018-05-10 13:33:06 +02:00
test_msg_ethereum_verifymessage.py tests: ethereum sign/verify is skipped (#224) 2018-03-02 16:37:34 +01:00
test_msg_getaddress_segwit_native.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_getaddress_segwit.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_getaddress_show.py tests/device_tests: for t2, enable bch & multisig, disable load & reset 2018-02-27 16:29:59 +01:00
test_msg_getaddress.py disable bcash tests for T2 2018-04-05 17:03:36 +02:00
test_msg_getecdhsessionkey.py tests: add test_msg_getecdhsessionkey.py (#233) 2018-03-11 22:51:14 +01:00
test_msg_getentropy.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_getpublickey_curve.py tests: fix test_msg_getpublickey_curve.py (don't try public derivation for ed25519) 2018-03-07 15:46:09 +01:00
test_msg_getpublickey.py tests: update test_msg_getpublickey.py, add test_msg_getpublickey_curve.py 2018-03-05 17:37:56 +01:00
test_msg_lisk_getaddress.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_lisk_getpublickey.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_lisk_signmessage.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_lisk_signtx.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_lisk_verifymessage.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_loaddevice_xprv.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_loaddevice.py tests/device_tests: for t2, enable bch & multisig, disable load & reset 2018-02-27 16:29:59 +01:00
test_msg_nem_getaddress.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_nem_signtx_mosaics_t2.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_nem_signtx_mosaics.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_nem_signtx_multisig.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_nem_signtx_others.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_nem_signtx_transfers.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_ping.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_recoverydevice_dryrun.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_recoverydevice_t2.py tests: add T2 RecoveryDevice test 2018-03-22 15:28:04 +01:00
test_msg_recoverydevice.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_resetdevice_skipbackup.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_resetdevice_t2.py tests: add T2 ResetDevice test 2018-03-20 16:47:11 +01:00
test_msg_resetdevice.py tests/device_tests: for t2, enable bch & multisig, disable load & reset 2018-02-27 16:29:59 +01:00
test_msg_signidentity.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_signmessage_segwit_native.py tests: enable segwit sign&verify tests for t2 2018-03-05 17:45:17 +01:00
test_msg_signmessage_segwit.py tests: enable segwit sign&verify tests for t2 2018-03-05 17:45:17 +01:00
test_msg_signmessage.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_signtx_bcash.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_msg_signtx_bitcoin_gold.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_msg_signtx_decred.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_msg_signtx_segwit_native.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_msg_signtx_segwit.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_msg_signtx_zcash.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_signtx.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_msg_stellar_get_public_key.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_stellar_sign_message.py tests/device/stellar: verify message 2018-05-14 16:53:10 +02:00
test_msg_stellar_sign_transaction.py device_tests: allow custom runxfail 2018-05-22 17:29:03 +02:00
test_msg_stellar_verify_message.py tests/stellar: verify marked as not passing on T2 2018-05-16 15:04:00 +02:00
test_msg_verifymessage_segwit_native.py tests: enable segwit sign&verify tests for t2 2018-03-05 17:45:17 +01:00
test_msg_verifymessage_segwit.py tests: enable segwit sign&verify tests for t2 2018-03-05 17:45:17 +01:00
test_msg_verifymessage.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_msg_wipedevice.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_multisig_change.py coins: refactor, use data from coins.json instead of hardcoded lists 2018-04-10 15:58:34 +02:00
test_multisig.py tests/device: assert exception type and message 2018-02-27 15:08:00 +01:00
test_op_return.py tests/device: assert exception type and message 2018-02-27 15:08:00 +01:00
test_protect_call.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_protection_levels.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00
test_zerosig.py device tests: simplify, drop unittest dependency 2017-12-23 22:03:24 +01:00