type-c-service/tests: Convert std/ucsi example into integration test#886
Open
RobertZ2011 wants to merge 4 commits into
Open
type-c-service/tests: Convert std/ucsi example into integration test#886RobertZ2011 wants to merge 4 commits into
RobertZ2011 wants to merge 4 commits into
Conversation
f690595 to
9dabda1
Compare
9dabda1 to
e4c6cab
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the previous examples/std UCSI workflow into a type-c-service integration test, so UCSI behavior is exercised under cargo test rather than via a standalone example binary.
Changes:
- Added a new Tokio-based integration test (
type-c-service/tests/ucsi.rs) that drives PPM/LPM commands and validates emitted UCSI CCI events. - Removed the old std example binary (
examples/std/src/bin/type_c/ucsi.rs) and its[[bin]]entry. - Enabled
PartialEq/Eqon UCSI-related response/message types to support equality assertions in tests, and adjusted the crate’slogfeature wiring.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
type-c-service/tests/ucsi.rs |
New UCSI integration test covering PPM reset/notification enable and per-port connect/status/ack flows. |
type-c-service/tests/common/mod.rs |
Increased the shared integration-test timeout constant. |
type-c-service/Cargo.toml |
log feature now also enables power-policy-service/log (used by the integration test harness). |
examples/std/src/bin/type_c/ucsi.rs |
Removed the std UCSI example implementation (superseded by the integration test). |
examples/std/Cargo.toml |
Removed the type-c-ucsi bin target entry. |
embedded-service/src/type_c/external.rs |
Added PartialEq/Eq to UcsiResponse for test assertions. |
embedded-service/src/type_c/comms.rs |
Added PartialEq/Eq to Type-C comms message types for test assertions. |
135a1ce to
489fb9d
Compare
kurtjd
previously approved these changes
Jun 11, 2026
jerrysxie
previously approved these changes
Jun 11, 2026
jerrysxie
left a comment
Contributor
There was a problem hiding this comment.
@RobertZ2011 Are we planning to forward port some of these tests into main at some point?
Contributor
Author
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.
No description provided.