1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-17 13:12:05 +00:00
trezor-firmware/ci/hardware_tests/bootstrap.py
Marek Mahut 4264e87319 ci: add hardware tests for T1
This enables to run device tests against an actual device connected to
our CI. It uses https://github.com/mmahut/tpmb to enter bootloader and
then it uploads a debug firmware to the device. The debug mode is the
used to "click" the buttons but we might improve this and actually use
the hardware buttons instead.
2020-04-10 11:23:07 +02:00

21 lines
435 B
Python
Executable File

import configparser
import sys
from device.t1 import TrezorOne
def main(file: str = None):
config = configparser.ConfigParser()
config.read_file(open("hardware.cfg"))
t1 = TrezorOne(
config["t1"]["location"], config["t1"]["port"], config["t1"]["arduino_serial"],
)
t1.update_firmware(file)
if __name__ == "__main__":
file = None
if len(sys.argv) == 2:
file = sys.argv[1]
main(file)