refactor(autoware_trajectory_validator): consolidate test targets#12467
refactor(autoware_trajectory_validator): consolidate test targets#12467yhisaki wants to merge 3 commits intoautowarefoundation:mainfrom
Conversation
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
| test/plugins/test_vehicle_constraint_filter.cpp | ||
| ) | ||
|
|
||
| ament_auto_add_gtest(test_${PROJECT_NAME} |
There was a problem hiding this comment.
Since the tests use ros2 communication they need to be added with ament_add_ros_isolated_gtest.
There was a problem hiding this comment.
@maxime-clem
Thanks!
I found that the only difference between ament_auto_add_gtest and ament_add_ros_isolated_gtest is just a RUNNER.
So, I set RUNNER manually ad601ac.
There was a problem hiding this comment.
I had missed that line. However, I believe it is better to use ament_add_ros_isolated_gtest instead of setting the RUNNER manually.
The main reason is that in the future the way to run isolated tests may change and the macro may be updated, and this code may miss the update.
There was a problem hiding this comment.
I see. At first, I wanted to use the automatic dependency resolution feature in ament_auto_xxx, but it can't be helped😢
If there's no better way, I'll revert it.
Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
Description
Before this PR,
autoware_trajectory_validatorbuilt its tests as multiple executables and kept redundant setup code in the traffic light filter test.This PR refactors the trajectory validator test configuration.
CMakeLists.txtwith${PROJECT_NAME}-based namestest_traffic_light_filter.cppby removing unused node setup, redundantmain, and an unused helper headerRelated links
Parent Issue:
Notes for reviewers
The current diff also switches the aggregated test target to
ament_auto_add_gtest(...), so reviewers should confirm that the required link dependencies for the node-oriented test remain satisfied in CI.Interface changes
ROS Parameter Changes
Additions and removals
Modifications
Topic changes
Additions and removals
Modifications
Effects on system behavior
None. This change only affects test code and test build configuration.