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(tests): don't leave emulator process running #4687

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mmilata
Copy link
Member

@mmilata mmilata commented Feb 26, 2025

When an exception is raised in the wrong place, pytest exits but leaves emulator process running in the background. This can result in confusing behavior of further pytest invocations which will connect to this old emulator. The fix attempts to keep track of running emulators in a global variable and then kill them in atexit() hook.

Included are two more quality of life improvements.

@mmilata mmilata requested a review from matejcik as a code owner February 26, 2025 22:11
@mmilata mmilata requested review from romanz and removed request for matejcik February 26, 2025 22:12
Copy link

github-actions bot commented Feb 26, 2025

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) test(screens) main(screens)
T3T1 Safe 5 test(screens) main(screens) test(screens) main(screens) test(screens) main(screens)
All main(screens)

@mmilata mmilata requested a review from matejcik February 26, 2025 22:14
@mmilata mmilata force-pushed the mmilata/runaway-emu branch from 649bdcc to 8e72395 Compare February 26, 2025 23:38
Copy link
Contributor

@romanz romanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mmilata mmilata force-pushed the mmilata/runaway-emu branch from 57ae719 to cca7d93 Compare February 28, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 Needs review
Development

Successfully merging this pull request may close these issues.

3 participants