[ROS 2] Add function for same-package pluginlib tests#201
Merged
Conversation
Adds pluginlib_enable_plugin_testing() This CMake function handles creating a fake install environment for testing pluginlib plugins in the same package that built them. This replaces manually creating this folder structure just to run unit tests. Signed-off-by: Shane Loretz<sloretz@openrobotics.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Member
|
I haven't done a full review, nor do I have time in my schedule for one but I'm in favor of this approach and have no qualms about letting it merge if it does get a reviewer. |
wjwwood
approved these changes
Aug 25, 2020
Member
wjwwood
left a comment
There was a problem hiding this comment.
lgtm, approach seems good to me, documentation makes sense, and I didn't see any issues with the implementation (that FOOBAR trick is weird, but seems fine).
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Contributor
Author
Contributor
Author
|
CI LGTM and the PR has been approved except for 5ad3b38 which fixes a typo in a comment. That seems trivial enough of a fix to not need a second review. Merging. |
sloretz
added a commit
that referenced
this pull request
Aug 25, 2020
* Add function for same-package pluginlib tests Adds pluginlib_enable_plugin_testing() This CMake function handles creating a fake install environment for testing pluginlib plugins in the same package that built them. This replaces manually creating this folder structure just to run unit tests. Signed-off-by: Shane Loretz<sloretz@openrobotics.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Grammar and unused variable Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Typo in comment Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
Karsten1987
reviewed
Aug 27, 2020
sloretz
added a commit
that referenced
this pull request
Dec 7, 2021
* [ROS 2] Add function for same-package pluginlib tests (#201) * Add function for same-package pluginlib tests Adds pluginlib_enable_plugin_testing() This CMake function handles creating a fake install environment for testing pluginlib plugins in the same package that built them. This replaces manually creating this folder structure just to run unit tests. Signed-off-by: Shane Loretz<sloretz@openrobotics.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Grammar and unused variable Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Typo in comment Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@openrobotics.org> * cmake 3.5 compatibility (#203) Signed-off-by: Karsten Knese <karsten@openrobotics.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> * Remove unused variable output_library (#211) Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Co-authored-by: Karsten Knese <Karsten1987@users.noreply.github.com>
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.
Adds
pluginlib_enable_plugin_testing()This CMake function handles creating a fake install environment for
testing pluginlib plugins in the same package that built them.
This replaces manually creating this folder structure just to run unit
tests.
This is to support testing a plugin in ros2/urdf#13 . See this commit: ros2/urdf@3341988
This function works by creating fake ament resource index entries in the build space to mimic the use of the ament index for registering packages and plugins. This was already being done manually in pluginlib (see the changes to CMakeLists.txt in this PR), but I found myself wanting to do the same thing in a downstream package.