-
Notifications
You must be signed in to change notification settings - Fork 181
[YAML Parser] Support parameter value parsing #471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jacobperron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left a few comments below.
I would do a "rebase and merge" to keep the rcl dependency removal in a separate commit from the new function.
Ah, nevermind, I see #470 🙃 |
07e34d4 to
a1a833f
Compare
|
@jacobperron had to rebase after changes got applied to #470, sorry about that. PTAL. |
| char * path = rcutils_join_path(test_path, "correct_config.yaml", allocator); | ||
| fprintf(stderr, "cur_path: %s\n", path); | ||
| EXPECT_TRUE(rcutils_exists(path)); | ||
| ASSERT_TRUE(rcutils_exists(path)) << "No test YAML file found at " << path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use ASSERT_*, I think we should make sure to free resources in the event that the assertion fails. We can use the helper OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT to make sure test_path, path, and params_hdl are cleaned up when the test exits.
I guess this should also be added to the other tests as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but since it's a test I was less worried about memory freeing. But using OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT sounds like a much better plan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, some folks went through and fixed a bunch of leaks detected by ASan jobs (for example). Even though they're just tests, it will make those jobs happy.
jacobperron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI
Signed-off-by: Michel Hidalgo <[email protected]>
- Improve test coverage using new getter API. - Unify function return style and improve readability. Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
9aa69f4 to
8716384
Compare
|
Alright, CI is green! Merging. |
To prevent the Executor::spin_some() method for potentially running indefinitely long. Distribution Statement A; OPSEC #2893 Signed-off-by: Roger Strain <[email protected]>
Closes #246. This pull request extends the YAML parser API to include:
This way, parameter addressing information can directly provided along with the parameter value as a YAML string to be parsed.
Depends on #470.