Description
Some hardware test scenarios require specific DAPLink firmware features (e.g. config zone commands added in firmware v1.1.0). Running these tests on a board with an older firmware causes crashes or false failures.
We need a mechanism to declare a minimum firmware version per scenario and skip tests gracefully when the firmware is too old.
Note: this issue originally referenced flash.firmware_version(). Since then, the bridge layer has been factored out and the version query belongs to DaplinkBridge (see #242). The runner should query the bridge directly.
Proposed approach
YAML scenario declaration
Add an optional min_firmware field to scenarios:
driver: steami_config
min_firmware: [1, 1, 0] # Requires config zone support
tests:
- name: "Save and load config on hardware"
mode: [hardware]
...
Or at the individual test level:
- name: "Save and load magnetometer calibration on hardware"
min_firmware: [1, 1, 0]
mode: [hardware]
...
Test runner behavior
- Before running a hardware test with
min_firmware, query bridge.firmware_version() (where bridge is a DaplinkBridge instance built from the test I2C bus).
- If the firmware version is below the minimum, skip the test with a clear message:
SKIPPED: requires DAPLink firmware >= 1.1.0 (found 1.0.0)
- Cache the version query for the duration of the test session to avoid repeated I2C reads.
Fallback
If firmware_version() raises an error (old firmware without the command), treat the version as (0, 0, 0) and skip all tests with a minimum requirement.
Dependencies
Related
Description
Some hardware test scenarios require specific DAPLink firmware features (e.g. config zone commands added in firmware v1.1.0). Running these tests on a board with an older firmware causes crashes or false failures.
We need a mechanism to declare a minimum firmware version per scenario and skip tests gracefully when the firmware is too old.
Proposed approach
YAML scenario declaration
Add an optional
min_firmwarefield to scenarios:Or at the individual test level:
Test runner behavior
min_firmware, querybridge.firmware_version()(wherebridgeis aDaplinkBridgeinstance built from the test I2C bus).SKIPPED: requires DAPLink firmware >= 1.1.0 (found 1.0.0)Fallback
If
firmware_version()raises an error (old firmware without the command), treat the version as(0, 0, 0)and skip all tests with a minimum requirement.Dependencies
DaplinkBridge(must be implemented first)Related