1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-18 11:21:11 +00:00
trezor-firmware/ci/hardware_tests/device/tt.py
2021-02-05 12:58:21 +01:00

22 lines
604 B
Python

from .device import Device
class TrezorT(Device):
def update_firmware(self, file=None):
# reset to enter bootloader again
self.power_off()
self.power_on()
if not file:
raise ValueError(
"Uploading production firmware will replace the bootloader, it is not allowed!"
)
self.wait(5)
print("[software] Updating the firmware to {}".format(file))
self.run_trezorctl("firmware-update -s -f {} &".format(file))
# upgrading to 2.3.2 took about 80s
self.wait(80)
self.check_version()