From 28e177c4424820aee8a6f031474c890e5bafe72c Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 13 Oct 2022 12:21:23 +0200 Subject: [PATCH] Support interactive testing using INTERACT=1 --- tests/vendor/trezor/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/vendor/trezor/utils.py b/tests/vendor/trezor/utils.py index fa4ba3c..78ca4a9 100644 --- a/tests/vendor/trezor/utils.py +++ b/tests/vendor/trezor/utils.py @@ -10,10 +10,11 @@ def get_device(): path = os.environ.get("TREZOR_PATH") + interact = os.environ.get("INTERACT") == "1" if path: try: transport = get_transport(path) - return TrezorClientDebugLink(transport) + return TrezorClientDebugLink(transport, auto_interact=not interact) except Exception as e: raise RuntimeError("Failed to open debuglink for {}".format(path)) from e @@ -21,7 +22,7 @@ def get_device(): devices = enumerate_devices() for device in devices: try: - return TrezorClientDebugLink(device) + return TrezorClientDebugLink(device, auto_interact=not interact) except Exception: pass else: