Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix status screen for UI tests #4245

Open
wants to merge 43 commits into
base: matejcik/global-layout-only3
Choose a base branch
from

Conversation

obrusvit
Copy link
Contributor

@obrusvit obrusvit commented Oct 3, 2024

Targeting GFL branch as this can go after.

To clarify: setting the timeout to 0 is not necessary but speeds up the tests.

matejcik and others added 30 commits September 26, 2024 14:47
It is being moved into a custom handler for the debug app.
otherwise if _handle_single_message raises an exception (which is
fortunately not something that should generally happen), the
finally-block would fail on "referenced before assignment"
* RequestPaint message is sent at construction time to force calculation
  of number of pages
* given that Attach corresponds to "start the layout" message, Child now
  responds to Attach the same way it responds to RequestPaint, by
  force-repainting everything.
This doesn't actually advance the progress while device erase is ongoing, but at least the user sees a loader.
to prevent "unexpected response to Initialize" errors
The global layout related changes were wrong for T1 where debuglink
behavior is significantly different; in particular, it is not always
possible to communicate over debuglink.

This change reverts to the old behavior for T1B1 and keeps the new one
only for core-based models.
This was necessary for hooking display.refresh() with the old UI toolkit.
With the new one, we explicitly refresh the display after every paint, so
implicit after-step refresh seems no longer necessary.
same behavior as on Trezor One
* improve sync_responses to work on uninitialized instance
* sync responses at construction time
Otherwise a test can hang if the result is not returned. This is not
even covered by pytest-timeout because if a test fails, the call to
task.kill() happens during teardown, and pytest-timeout doesn't cover
that.
matejcik and others added 13 commits September 26, 2024 14:47
In certain cases a DebugLinkState response can get stalled and debuglink
will not read it -- i.e., a situation analogous to wirelink de-sync.
There doesn't seem to be a good way to force-sync debuglink the same way
wirelink does it, but we can detect a wrong response to a
DebugLinkGetState and skip it.
instead, download it to a temp location, as the Prophecy (and authors of
urlretrieve) foretold
to make it easier to run cargo separately, and support rust-analyzer
without tweaking its config
@obrusvit obrusvit added tests Automated integration tests T3T1 labels Oct 3, 2024
@obrusvit obrusvit self-assigned this Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 2024

core UI changes device test click test persistence test
T2T1 Model T test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
T3B1 Safe 3 test(screens) main(screens) test(screens) main(screens) 2724
T3T1 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

Copy link

github-actions bot commented Oct 3, 2024

legacy UI changes device test(screens) main(screens)

@matejcik matejcik force-pushed the matejcik/global-layout-only3 branch from f84d33e to 5d9d97e Compare October 9, 2024 11:52
@andrewkozlik andrewkozlik removed their request for review October 9, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T3T1 tests Automated integration tests
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

3 participants