tests: Add board qualification tests for A/B/Menu buttons.#92
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new board-level qualification scenario to validate that the STeaMi board’s A, B, and MENU buttons (direct GPIO, active-low w/ pull-up) can be detected during an interactive hardware test run.
Changes:
- Adds
tests/scenarios/board_buttons.yamlas atype: boardscenario. - Implements three
hardware_scripttests that lightLED_GREENand poll each button for up to 5 seconds. - Marks all tests as
mode: [hardware]so they are skipped unless run with--port(and interactive-s).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8135db7 to
6cc871e
Compare
|
Corrections suite à la review Copilot (fd3334d) :
|
There was a problem hiding this comment.
Pull request overview
Adds a new board qualification scenario to validate STeaMi’s A/B/MENU buttons via interactive MicroPython scripts executed directly on hardware (no driver required), aligning with the recently introduced type: board scenario support.
Changes:
- Add
tests/scenarios/board_buttons.yamlwith hardware-only button press detection scripts. - Provide both polling-based and interrupt-based detection variants per button.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Closes #86
Depends on #89 (framework extension)
Adds board qualification tests for the A, B, and Menu buttons (directly connected to STM32WB55 GPIO, not via I/O expander).
Note: D-PAD buttons (UP/DOWN/LEFT/RIGHT) are already tested in
mcp23009e.yamlvia the MCP23009E I/O expander.Scenario:
tests/scenarios/board_buttons.yamlA_BUTTON(PA7)hardware_script(interactive)B_BUTTON(PA8)hardware_script(interactive)MENU_BUTTON(PA0)hardware_script(interactive)Each test lights up the green LED and polls the button for 5 seconds. The operator must press the button while the LED is on.
How to test
Test results
Hardware test results will be added after board validation.
Test plan
ruff check tests/— passedpytest tests/ -k mock— 41 passed (no regression)--port