tests: Add board qualification test for I2C bus scan.#90
tests: Add board qualification test for I2C bus scan.#90nedseb merged 4 commits intofeature/board-qualification-frameworkfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new board-level qualification YAML scenario to validate the STeaMi board’s internal I2C bus population by scanning I2C(1) on hardware and asserting that expected devices are present and no unknown devices appear (per #84, leveraging the “board scenario” framework from #89).
Changes:
- Introduces
board_i2c_scanboard scenario with two hardware-only tests: (1) required-address presence and (2) no-unexpected-addresses check. - Encodes the expected/known I2C address sets directly in the scenario scripts.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5529dea to
e56ada4
Compare
|
Corrections suite à la review Copilot (58277d9) :
|
There was a problem hiding this comment.
Pull request overview
Adds a new board-level qualification YAML scenario to validate the STeaMi board’s internal I2C bus by scanning for expected devices and performing a few identification-register sanity checks, leveraging the existing type: board scenario runner behavior.
Changes:
- Introduces a new
type: boardscenario that scansI2C(1)and asserts a fixed set of expected/known addresses. - Adds per-device WHO_AM_I / ID-register reads for several components to confirm devices respond correctly beyond just presence on the bus.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Réponses aux commentaires Copilot :
Adresses incohérentes avec la description PR (commentaire 3) — Corrigé : la description PR est mise à jour avec les bonnes adresses (0x3B=STM32F103CB, 0x6B=ISM330DL ajoutés, 0x5C retiré). Tests WHO_AM_I non mentionnés (commentaire 4) — Corrigé : la description PR liste maintenant les 9 tests (2 scan + 7 WHO_AM_I/Device ID) avec un tableau détaillé des registres et valeurs attendues. |
Summary
Closes #84
Depends on #89 (framework extension)
Adds a board qualification test scenario that scans the internal I2C bus, verifies all expected device addresses are present, and checks the WHO_AM_I / device ID register of each component.
Scenario:
tests/scenarios/board_i2c_scan.yamlBus scan tests (2 tests)
WHO_AM_I / Device ID tests (7 tests)
Expected I2C addresses (7-bit):
0x1ELIS2MDL,0x20MCP23009E,0x29VL53L1X,0x39APDS99600x3BSTM32F103CB,0x55BQ27441,0x5DWSEN-PADS0x5FHTS221/WSEN-HIDS,0x6BISM330DLNote: MCP23009E requires releasing
RST_EXPANDERpin before scan.How to test
Test plan
ruff check tests/— passedpytest tests/ -k mock— 41 passed (no regression)--port