Skip to content

zephyr-cp tests: let a capture test stop the simulator at its duration - #11323

Merged
dhalbert merged 1 commit into
adafruit:mainfrom
MakerClassCZ:zephyr-tests-stop-at
Sep 7, 2026
Merged

dhalbert merged 1 commit into
adafruit:mainfrom
MakerClassCZ:zephyr-tests-stop-at

Conversation

@lynt-smitka

Copy link
Copy Markdown

A display test with scheduled captures holds its last frame in while True: time.sleep(1), so native_sim never exits on its own and wait_until_done() waits out the whole wall-clock timeout: every capture test takes exactly its duration, 346 s for the 26 display tests.

Pass the duration as -stop_at so the simulator ends the run itself. In -no-rt the idle loop is fast-forwarded: gifio 60 s -> 2 s, the display suite 346 s -> 19 s, goldens unchanged. Realtime tests are left alone.

This fix was found after consulting with AI and testing multiple methods.

A display test with scheduled captures holds its last frame in
`while True: time.sleep(1)`, so native_sim never exits on its own and
wait_until_done() waits out the whole wall-clock timeout: every capture
test takes exactly its duration, 346 s for the 26 display tests.

Pass the duration as -stop_at so the simulator ends the run itself. In
-no-rt the idle loop is fast-forwarded: gifio 60 s -> 2 s, the display
suite 346 s -> 19 s, goldens unchanged. Realtime tests are left alone.

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great; I am looking for more time savings in the zephyr tests, which now are the limiting factor on short PR runs.

@dhalbert
dhalbert merged commit dea8844 into adafruit:main Sep 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants