WIP - do not do HTC in very long Shamir click test

grdddj/debuglink_improvements
grdddj 1 year ago
parent a45f1fb5f9
commit 67d87fab94

@ -80,7 +80,9 @@ def set_selection(debug: "DebugLink", button: tuple[int, int], diff: int) -> Non
debug.press_middle(wait=True)
def read_words(debug: "DebugLink", backup_type: messages.BackupType) -> list[str]:
def read_words(
debug: "DebugLink", backup_type: messages.BackupType, do_htc: bool = True
) -> list[str]:
words: list[str] = []
layout = debug.read_layout()
@ -109,9 +111,14 @@ def read_words(debug: "DebugLink", backup_type: messages.BackupType) -> list[str
if debug.model == "T":
words.extend(layout.seed_words())
# It is hold-to-confirm
# There is hold-to-confirm button
if debug.model == "T":
debug.click(buttons.OK, hold_ms=1500, wait=True)
# It would take a very long time to test 16-of-16 with doing 1500 ms HTC after
# each word set
if do_htc:
debug.click(buttons.OK, hold_ms=1500, wait=True)
else:
debug.press_yes()
return words

@ -299,6 +299,9 @@ def test_dryrun_locks_at_number_of_words(device_handler: "BackgroundDeviceHandle
# unlock
if debug.model == "T":
# Need to click two times to get the correct layout
# because of the lockscreen
layout = debug.click(buttons.OK, wait=True)
layout = debug.click(buttons.OK, wait=True)
assert "PinKeyboard" in layout.str_content
elif debug.model == "R":

@ -119,7 +119,7 @@ def _slip39_advanced_reset(
for _ in range(group_count):
for _ in range(share_count):
# read words
words = reset.read_words(debug, messages.BackupType.Slip39_Advanced)
words = reset.read_words(debug, messages.BackupType.Slip39_Advanced, do_htc=False)
# confirm words
reset.confirm_words(debug, words)

Loading…
Cancel
Save