Add raw UART loopback tests (New) - #2650
Conversation
Add CE OEM serial raw UART loopback coverage with configurable quick and stress template jobs. Include resource generation, safety checks, documentation, tests, and the PySerial runtime dependency.
There was a problem hiding this comment.
Pull request overview
This PR adds raw UART (TX/RX loopback) coverage to the CE OEM provider by introducing a resource-driven job generator, quick/stress loopback jobs, a supporting Python helper, and snap/runtime dependencies to run the tests in CE OEM snaps.
Changes:
- Extend CE OEM serial test plans to include generated raw UART loopback jobs (quick + stress) and their resource generation.
- Add
serial_raw_uart_test.pyhelper (resource listing + quick/stress execution) with unit tests and end-user documentation. - Add a new manifest gate (
has_serial_raw_uart_loopback) and includepython3-serialin relevant CE OEM snapcraft definitions.
Reviewed changes
Copilot reviewed 13 out of 14 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 the new raw UART resource + generated quick/stress templates in serial test plans (incl. suspend variants). |
| contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/serial_raw_uart.pxu | Defines the resource generator and the quick/stress template jobs gated by the manifest. |
| contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/README.md | Documents configuration, manifest gating, expected I/O, and safety defaults for raw UART loopback. |
| contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/manifest.pxu | Adds has_serial_raw_uart_loopback manifest entry to gate selection of raw UART jobs. |
| contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_serial_raw_uart_test.py | Adds unit coverage for parsing, safety checks, baud selection, and command behaviors. |
| contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_raw_uart_test.py | Implements resource listing + loopback execution (quick/stress) and safety checks. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc26/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc24/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc22/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_uc20/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic26/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic24/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic22/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
| contrib/checkbox-ce-oem/checkbox-ce-oem-snap/series_classic20/snap/snapcraft.yaml | Adds python3-serial to support the helper at runtime. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2650 +/- ##
=======================================
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. 🚀 New features to boost your workflow:
|
Rename raw UART loopback coverage to self-loopback and document the required jumper connection. Add sweep-down support for quick and stress jobs, defaulting to enabled unless RAW_UART_SWEEP_DOWN is explicitly false.
Allow max baud to work with sweep-down and clarify the self-loopback hardware connection documentation.
rickwu666666
left a comment
There was a problem hiding this comment.
Some minor thing need to change. Overall LGTM.
| - device-tree-compiler | ||
| - linuxptp | ||
| - snmp | ||
| - python3-serial |
There was a problem hiding this comment.
We don't need this since checkbox core snap include it already.
Description
Add CE OEM serial raw UART loopback coverage with configurable quick and stress template jobs. Include resource generation, safety checks, documentation, tests, and the PySerial runtime dependency.
https://warthogs.atlassian.net/browse/OEMQA-6779
Resolved issues
Documentation
Tests
https://certification.canonical.com/hardware/202511-38135/submission/499170/