1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-30 10:08:18 +00:00
trezor-firmware/tests/upgrade_tests
matejcik a58823cc0c refactor(python): rework trezorlib protobuf codec
API-compatibility with the original one is retained.

Now that we don't need to keep code parity with core, we could do some
changes that make life easier.

All generated classes are now in one file. This makes github diffs more
readable, at the cost of somewhat complicating inspecting individual
classes; however, that is something we shouldn't be doing anyway.

Enums are now implemented as enum.IntEnum.

The original class-level FIELDS member was restored.

Each field is now defined via protobuf.Field, which is easier to work
with in the codec, AND we're not stuffing defaults and flags into the
same field.
2021-06-08 09:55:19 +02:00
..
__init__.py test: Add test for progressive storage version upgrades without unlocking in between. 2021-03-25 14:24:41 +01:00
README.md docs: move docs to root 2019-12-06 12:24:20 +00:00
test_firmware_upgrades.py test: Add upgrade test with enabled wipe code for legacy. 2021-03-25 14:24:41 +01:00
test_passphrase_consistency.py refactor(python): rework trezorlib protobuf codec 2021-06-08 09:55:19 +02:00

Running Upgrade Tests

  1. As always, use poetry environment:
poetry shell
  1. Download the emulators, if you have not already:
tests/download_emulators.sh
  1. And run the tests using pytest:
pytest tests/upgrade_tests

You can use TREZOR_UPGRADE_TEST environment variable if you would like to run core or legacy upgrade tests exclusively. This will run core only:

TREZOR_UPGRADE_TEST="core" pytest tests/upgrade_tests