Skip to content

Commit

Permalink
fuse_optimizers test: split optimizer.test into two rostests instead …
Browse files Browse the repository at this point in the history
…of depending on add_rostest_gtest doing it right and give unique test-names instead of twice the same which might fix this flaky test
  • Loading branch information
fabianhirmann committed Oct 3, 2024
1 parent be167aa commit 4c2fb2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion fuse_optimizers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if(CATKIN_ENABLE_TESTING)
)

# Optimizer Tests
add_rostest_gtest(test_optimizer
catkin_add_executable_with_gtest(test_optimizer
test/optimizer.test
test/test_optimizer.cpp
)
Expand All @@ -182,6 +182,7 @@ if(CATKIN_ENABLE_TESTING)
)

add_rostest(test/optimizer.test ARGS config:=list DEPENDENCIES test_optimizer)
add_rostest(test/optimizer.test ARGS config:=struct DEPENDENCIES test_optimizer)

# Fixed-lag Ignition test
add_rostest_gtest(test_fixed_lag_ignition
Expand Down
2 changes: 1 addition & 1 deletion fuse_optimizers/test/optimizer.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<launch>
<arg name="config" default="struct" doc="Config format: {list, struct}"/>

<test test-name="Optimizer" pkg="fuse_optimizers" type="test_optimizer">
<test test-name="Optimizer_config_$(arg config)" pkg="fuse_optimizers" type="test_optimizer">
<rosparam file="$(find fuse_optimizers)/test/config/$(arg config)/common_robot_config.yaml" command="load"/>
<rosparam file="$(find fuse_optimizers)/test/config/$(arg config)/robot_with_imu_config.yaml" command="load"/>
<rosparam file="$(find fuse_optimizers)/test/config/$(arg config)/noisy_motion_model_config.yaml" command="load"/>
Expand Down

0 comments on commit 4c2fb2c

Please sign in to comment.