Per-axis tests for nodl_generator_cpp + parameter_traits link fix#78
Open
lsy3 wants to merge 2 commits into
Open
Per-axis tests for nodl_generator_cpp + parameter_traits link fix#78lsy3 wants to merge 2 commits into
lsy3 wants to merge 2 commits into
Conversation
1e608fd to
54fc12e
Compare
The generated params header includes <parameter_traits/parameter_traits.hpp>, but the macro didn't find or link it — downstream packages that consume nodl_generate_cpp() with a NoDL file declaring `parameters:` failed to build with "parameter_traits/parameter_traits.hpp: No such file or directory". Add find_package(parameter_traits) to the extras and link parameter_traits::parameter_traits in the macro so consumers get the include path and library transitively. Declare the runtime dependency in package.xml. Signed-off-by: lsy3 <sylukewicent@gmail.com>
Replace the single monolithic test_node fixture (which mixed pub/sub + params in one YAML) with four single-axis fixtures so a failure in any one test points at exactly one generator codepath. See plan_cpp_tests.md for the rationale and rollout order. Axes covered: - pubsub: end-to-end round-trip — harness publishes on /echo_in, derived node's generated subscription dispatches into on_echo_in, derived republishes through the generated publisher on /echo_out, harness subscribes and confirms payload survived the round-trip. - service: harness client calls derived's generated /add server (asserts callback dispatch + computed response); derived's generated client calls harness server on /delegate_add (asserts client wiring). - params: defaults survive YAML -> generated round-trip, params declared on the node, read_only flag propagates to the parameter descriptor. - lifecycle: drives configure -> activate, exercises round-trip after activation, and proves the lifecycle-specific property — publishing before activate is silently dropped while the subscription still fires. Each axis follows the three-layer split: generated base (from nodl_generate_cpp) / derived class (handwritten "user" code) / gtest. Removes the old test_node.nodl.yaml + test_generated_node.cpp now that both their axes are covered cleanly. Signed-off-by: lsy3 <sylukewicent@gmail.com>
54fc12e to
cb6a14c
Compare
Author
|
@emersonknapp tagging you — this stacks on your nodl_generator_cpp PR. Would love a look when you have time. |
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.
Stacks on
emerson/nodl-generator-cpp.In the process of reviewing this PR I built tests to understand the generator. Figured the scaffolding would be useful, so opening this PR. Also surfaced a small bug — generated code wouldn't compile when the NoDL doc declared
parameters:.Commit 1 —
parameter_traitslink fix: generated params header includes<parameter_traits/parameter_traits.hpp>but the macro didn't find or link it. Addsfind_package+ link in the extras/macro and the<depend>inpackage.xml.Commit 2 — Split
test_nodl_generator_cppinto per-axis fixtures: one fixture per generator codepath so failures point at exactly one axis. Seeplan_cpp_tests.md.read_onlypropagates to descriptor.configure → activateworks; and publishing before activate is silently dropped (subscription still fires).Tested on Jazzy (arm64 container): 14 tests, 0 failures. Untested on Humble/Iron —
parameter_traitsrosdep key may differ.