Skip to content

Add raw UART loopback tests (New) - #2650

Open
seankingyang wants to merge 3 commits into
mainfrom
migration_serial_raw_uart
Open

Add raw UART loopback tests (New)#2650
seankingyang wants to merge 3 commits into
mainfrom
migration_serial_raw_uart

Conversation

@seankingyang

@seankingyang seankingyang commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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/

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.

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

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.py helper (resource listing + quick/stress execution) with unit tests and end-user documentation.
  • Add a new manifest gate (has_serial_raw_uart_loopback) and include python3-serial in 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.

@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 (0538242).
⚠️ Report is 5 commits behind head on main.

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.
📢 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.

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 rickwu666666 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.

Some minor thing need to change. Overall LGTM.

- device-tree-compiler
- linuxptp
- snmp
- python3-serial

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.

We don't need this since checkbox core snap include it already.

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.

3 participants