tests: Add multidriver temperature comparison scenario for calibration.#100
Merged
tests: Add multidriver temperature comparison scenario for calibration.#100
Conversation
This was referenced Mar 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new hardware-only board qualification scenario to compare temperatures from multiple onboard sensors, and updates the hardware test runner to support mounting the repository lib/ on-device so multidriver scripts can import drivers during execution.
Changes:
- Add
tests/scenarios/board_temperature_comparison.yamlboard scenario with 3 hardware checks (2 automated, 1 manual) comparing HTS221, WSEN-HIDS, WSEN-PADS, and LIS2MDL temperatures. - Extend
MpremoteBridge.run_raw_script()to accept an optionalmount_dirand print non-JSON diagnostic output before parsing the final JSON result. - Update
tests/test_scenarios.pyto mountlib/fortype: boardscenarios when adriversfield is present.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tests/test_scenarios.py | Mounts lib/ for board scenarios that declare drivers, then runs the script via run_raw_script(mount_dir=...). |
| tests/scenarios/board_temperature_comparison.yaml | New multidriver board scenario that imports four drivers from /remote/* and performs spread/range checks plus a manual coherence check. |
| tests/runner/mpremote_bridge.py | Improves mpremote failure detail selection and adds mount_dir + diagnostic printing to run_raw_script(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Mar 14, 2026
35e3b1a to
9f7d5ef
Compare
Contributor
Author
|
Suggestions Copilot prises en compte dans le commit 3822374 :
|
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #99
Summary
tests/scenarios/board_temperature_comparison.yaml— atype: boardscenario that reads temperature from 4 sensors simultaneously for cross-validation and calibrationdriversfield to board scenarios to trigger mountinglib/viampremote mountmpremote_bridge.py:run_raw_script()acceptsmount_dir, diagnostic output is printed, error messages include both stderr and stdouttest_scenarios.pyto passmount_dirwhen scenario hasdriversSensors compared
temperature()temperature()temperature()read_temperature_c()Note: BQ27441 (battery gauge) was excluded — its
__init__callsenterConfig/sealedwhich crashes withENODEV. ISM330DL (PR #50) will be added once merged (see #101). BME280 will be added once driver exists (see #102).Tests
Hardware validation results
Observations
Related
Test plan
ruff checkpassespytest tests/ -k mock— 44/44 passed (no regressions)pytest tests/ -k board --collect-only— 3 new tests collectedpytest tests/ --port /dev/ttyACM0 -s -k "Temperature and comparison"— 3/3 passed