Skip to content

Commit dea8844

Browse files
authored
Merge pull request adafruit#11323 from MakerClassCZ/zephyr-tests-stop-at
zephyr-cp tests: let a capture test stop the simulator at its duration
2 parents a5895a9 + 534cdad commit dea8844

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ports/zephyr-cp/tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ def circuitpython(request, board, sim_id, native_sim_binary, native_sim_env, tmp
356356
f"--port-resets={port_resets}",
357357
)
358358
)
359+
# Capture tests hold their last frame forever; stop the simulator at the
360+
# test's duration in simulated time instead of waiting out the timeout.
361+
if capture_times_ns and not use_realtime:
362+
cmd.append(f"-stop_at={timeout}")
359363

360364
# Always preserve retained memory (e.g. the safe-mode saved word) in
361365
# in case of reboot.

0 commit comments

Comments
 (0)