test: add Ouster code coverage flags and unit tests for hw_interface#5
Merged
Samahu merged 3 commits intoApr 21, 2026
Conversation
- Add nebula_ouster, nebula_ouster_common, nebula_ouster_decoders, and nebula_ouster_hw_interfaces flags to .codecov.yml following the pattern used by Hesai, Robosense, and Continental vendors. - Add GTest-based unit tests for OusterHwInterface covering: start without callback, empty callback registration, lifecycle, idempotent double start, stop without start, callback replacement while running, scan packet callback, and error code string conversion. - Update CMakeLists.txt with BUILD_TESTING block matching other vendors. Agent-Logs-Url: https://github.com/Samahu/nebula/sessions/e06d9bd5-4b3a-484a-bd8a-a5a3b002b63c Co-authored-by: Samahu <606033+Samahu@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Samahu/nebula/sessions/e06d9bd5-4b3a-484a-bd8a-a5a3b002b63c Co-authored-by: Samahu <606033+Samahu@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Samahu
April 20, 2026 15:06
View session
There was a problem hiding this comment.
Pull request overview
Adds Codecov flag coverage tracking and introduces unit tests to raise patch coverage for the Ouster integration, aligning it with the existing vendor package patterns in this repo.
Changes:
- Add Codecov
individual_flagsentries for the Ouster packages to track coverage per subpackage. - Add GTest unit tests for
nebula::drivers::OusterHwInterface, including lifecycle/error-path and packet-callback behavior. - Wire the new Ouster hw_interface test into
nebula_ouster_hw_interfacesvia aBUILD_TESTINGCMake block.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/nebula_ouster/nebula_ouster_hw_interfaces/test/test_ouster_hw_interface.cpp |
Adds GTest coverage for OusterHwInterface, including UDP callback triggering via a mock sender. |
src/nebula_ouster/nebula_ouster_hw_interfaces/CMakeLists.txt |
Adds ament_add_gtest target and dependencies for the new hw_interface tests. |
.codecov.yml |
Adds Codecov flags for Ouster packages to address 0% patch coverage reporting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… on separate calls Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
751e137
into
add-ouster-lidar-support-via-submodule
12 of 13 checks passed
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.
Summary
Addresses the 0% patch coverage on Ouster packages reported by the Codecov Report on PR #2. The patch coverage target is 90%, but all 398 new lines from the Ouster integration had 0% coverage.
Changes
1. Codecov flag configuration (
.codecov.yml)Added individual coverage flags for Ouster packages, matching the pattern used by Hesai, Robosense, and Continental:
nebula_ouster→src/nebula_ouster/nebula_ousternebula_ouster_common→src/nebula_ouster/nebula_ouster_commonnebula_ouster_decoders→src/nebula_ouster/nebula_ouster_decodersnebula_ouster_hw_interfaces→src/nebula_ouster/nebula_ouster_hw_interfaces2. Unit tests (
nebula_ouster_hw_interfaces/test/test_ouster_hw_interface.cpp)Added GTest-based unit tests for
OusterHwInterfacefollowing the same pattern astest_robosense_hw_interface.cpp:3. CMake test integration (
nebula_ouster_hw_interfaces/CMakeLists.txt)Added
BUILD_TESTINGblock withament_add_gtestmatching the structure of other vendor packages (Robosense, Hesai, Continental).