Skip to content

ci: add ros2dds feature to coverage job #175

@YuanYuYuan

Description

@YuanYuYuan

The coverage job in ci.yml runs cargo llvm-cov with default features only, which excludes the ros2dds backend entirely. All ros2dds-gated code (Ros2DdsFormatter, Ros2Dds graph path, discovery tests) is invisible to coverage.

What to change

Add --features ros2dds to the cargo llvm-cov invocation in the Code Coverage job (line ~241 of .github/workflows/ci.yml):

cargo llvm-cov \
  -p ros-z -p ros-z-codegen -p ros-z-cdr -p ros-z-protocol -p ros-z-schema \
  --features ros2dds \
  -j4 \
  --lcov --output-path lcov.info

Why

Noticed while reviewing PR #146: the new Graph::new Ros2Dds arm and its test (test_ros2dds_context_graph_tracks_local_entities, gated by #[cfg(feature = "ros2dds")]) show as uncovered because the coverage run never enables the feature. The _ forward-compat arm for the #[non_exhaustive] KeyExprFormat will remain uncovered by design, but the Ros2Dds path itself should be covered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions