From 5f85a2f2927c31b862db5afa5bc17a6bc3c8ce27 Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Mon, 3 Feb 2025 10:41:23 +0100 Subject: [PATCH] fix(tests): fix screen recording for persistance tests on THP builds [no changelog] --- tests/ui_tests/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ui_tests/__init__.py b/tests/ui_tests/__init__.py index 8f2ad3dc10..b39d3756d5 100644 --- a/tests/ui_tests/__init__.py +++ b/tests/ui_tests/__init__.py @@ -9,6 +9,7 @@ from _pytest.nodes import Node from _pytest.outcomes import Failed from trezorlib.debuglink import TrezorClientDebugLink as Client +from trezorlib.client import ProtocolVersion from . import common from .common import SCREENS_DIR, UI_TESTS_DIR, TestCase, TestResult @@ -61,7 +62,8 @@ def screen_recording( yield finally: client.ensure_open() - client.sync_responses() + if client.protocol_version == ProtocolVersion.PROTOCOL_V1: + client.sync_responses() # Wait for response to Initialize, which gives the emulator time to catch up # and redraw the homescreen. Otherwise there's a race condition between that # and stopping recording.