Skip to content

Add RS485 Modbus peripheral test (New)#2648

Open
seankingyang wants to merge 1 commit into
mainfrom
migrate_rs485_thermal_sensor
Open

Add RS485 Modbus peripheral test (New)#2648
seankingyang wants to merge 1 commit into
mainfrom
migrate_rs485_thermal_sensor

Conversation

@seankingyang

Copy link
Copy Markdown
Contributor

Description

Migrate the Limerick RS485 thermal-sensor smoke test into a generic CE OEM serial Modbus peripheral read test. Add configurable resource generation, pymodbus-based register reads, documentation, tests, and snap runtime dependencies.

Resolved issues

Documentation

Tests

Copilot AI review requested due to automatic review settings July 7, 2026 05:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a configurable RS485 Modbus RTU peripheral “read registers” test to the CE OEM provider, turning a previously device-specific smoke test into a reusable serial peripheral check, including provider scripts, units, tests, documentation, and snap runtime deps.

Changes:

  • Extend CE OEM serial test plans to bootstrap/generate RS485 Modbus peripheral resources and include generated read jobs.
  • Add new resource/template units plus Python helpers to parse peripheral config and read Modbus registers via pymodbus.
  • Add unit tests for the new parser and Modbus read script, and stage python3-pymodbus in CE OEM snaps.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/test-plan.pxu Includes RS485 Modbus resource generation and generated read jobs in serial plans.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/rs485_modbus_peripheral.pxu Adds resource unit + template job to read Modbus registers from configured peripherals.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/README.md Documents manifest gating and RS485_MODBUS_PERIPHERALS configuration format.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/manifest.pxu Adds manifest entry to gate RS485 Modbus peripheral jobs.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_rs485_modbus_read.py Adds unit tests for CLI parsing, read success paths, and keyword fallback behavior.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_rs485_modbus_peripheral_parser.py Adds unit tests for config parsing and Checkbox resource record output.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/rs485_modbus_read.py Implements Modbus RTU register read helper using pymodbus.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/rs485_modbus_peripheral_parser.py Implements parsing/sanitization for resource generation from env configuration.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc24/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic24/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.
contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml Stages python3-pymodbus runtime dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add a generic CE OEM serial Modbus peripheral read test. Include configurable resource generation, pymodbus-based register reads, documentation, tests, and snap runtime dependencies.
@seankingyang
seankingyang force-pushed the migrate_rs485_thermal_sensor branch from a5a831c to 946298a Compare July 7, 2026 05:17
@seankingyang seankingyang changed the title Add RS485 Modbus peripheral test Add RS485 Modbus peripheral test (New) Jul 7, 2026
@seankingyang seankingyang added the ce-oem The PR only contains to the ce-oem provider under the contrib area label Jul 7, 2026
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.91%. Comparing base (547496b) to head (946298a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2648   +/-   ##
=======================================
  Coverage   59.91%   59.91%           
=======================================
  Files         485      485           
  Lines       48840    48840           
  Branches     8756     8756           
=======================================
  Hits        29263    29263           
  Misses      18655    18655           
  Partials      922      922           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ce-oem The PR only contains to the ce-oem provider under the contrib area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants