Skip to content

Commit 5f912eb

Browse files
authored
Add 'mimick' label to tests which use Mimick (#2516)
Signed-off-by: Scott K Logan <[email protected]>
1 parent 2cd8900 commit 5f912eb

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

rclcpp/test/rclcpp/CMakeLists.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ endif()
3131
ament_add_gtest(
3232
test_exceptions
3333
exceptions/test_exceptions.cpp)
34+
ament_add_test_label(test_exceptions mimick)
3435
if(TARGET test_exceptions)
3536
target_link_libraries(test_exceptions ${PROJECT_NAME} mimick)
3637
endif()
@@ -52,10 +53,12 @@ if(TARGET test_any_subscription_callback)
5253
target_link_libraries(test_any_subscription_callback ${PROJECT_NAME} ${test_msgs_TARGETS})
5354
endif()
5455
ament_add_gtest(test_client test_client.cpp)
56+
ament_add_test_label(test_client mimick)
5557
if(TARGET test_client)
5658
target_link_libraries(test_client ${PROJECT_NAME} mimick ${rcl_interfaces_TARGETS} ${test_msgs_TARGETS})
5759
endif()
5860
ament_add_gtest(test_clock test_clock.cpp)
61+
ament_add_test_label(test_clock mimick)
5962
if(TARGET test_clock)
6063
target_link_libraries(test_clock ${PROJECT_NAME} mimick ${rcl_interfaces_TARGETS} ${test_msgs_TARGETS})
6164
endif()
@@ -69,6 +72,7 @@ if(TARGET test_create_timer)
6972
target_include_directories(test_create_timer PRIVATE ./)
7073
endif()
7174
ament_add_gtest(test_generic_client test_generic_client.cpp)
75+
ament_add_test_label(test_generic_client mimick)
7276
if(TARGET test_generic_client)
7377
target_link_libraries(test_generic_client ${PROJECT_NAME}
7478
mimick
@@ -80,6 +84,7 @@ if(TARGET test_generic_client)
8084
)
8185
endif()
8286
ament_add_gtest(test_client_common test_client_common.cpp)
87+
ament_add_test_label(test_client_common mimick)
8388
if(TARGET test_client_common)
8489
target_link_libraries(test_client_common ${PROJECT_NAME}
8590
mimick
@@ -106,6 +111,7 @@ function(test_add_callback_groups_to_executor_for_rmw_implementation)
106111
endfunction()
107112
call_for_each_rmw_implementation(test_add_callback_groups_to_executor_for_rmw_implementation)
108113
ament_add_gtest(test_expand_topic_or_service_name test_expand_topic_or_service_name.cpp)
114+
ament_add_test_label(test_expand_topic_or_service_name mimick)
109115
if(TARGET test_expand_topic_or_service_name)
110116
target_link_libraries(test_expand_topic_or_service_name ${PROJECT_NAME} mimick rcl::rcl rmw::rmw)
111117
endif()
@@ -137,6 +143,7 @@ if(TARGET test_intra_process_buffer)
137143
endif()
138144

139145
ament_add_gtest(test_loaned_message test_loaned_message.cpp)
146+
ament_add_test_label(test_loaned_message mimick)
140147
target_link_libraries(test_loaned_message ${PROJECT_NAME} mimick ${test_msgs_TARGETS})
141148

142149
ament_add_gtest(test_memory_strategy test_memory_strategy.cpp)
@@ -146,6 +153,7 @@ ament_add_gtest(test_message_memory_strategy test_message_memory_strategy.cpp)
146153
target_link_libraries(test_message_memory_strategy ${PROJECT_NAME} ${test_msgs_TARGETS})
147154

148155
ament_add_gtest(test_node test_node.cpp TIMEOUT 240)
156+
ament_add_test_label(test_node mimick)
149157
if(TARGET test_node)
150158
target_link_libraries(test_node ${PROJECT_NAME} mimick rcpputils::rcpputils rmw::rmw ${test_msgs_TARGETS})
151159
endif()
@@ -157,6 +165,7 @@ if(TARGET test_node_interfaces__get_node_interfaces)
157165
endif()
158166
ament_add_gtest(test_node_interfaces__node_base
159167
node_interfaces/test_node_base.cpp)
168+
ament_add_test_label(test_node_interfaces__node_base mimick)
160169
if(TARGET test_node_interfaces__node_base)
161170
target_link_libraries(test_node_interfaces__node_base ${PROJECT_NAME} mimick rcl::rcl rmw::rmw)
162171
endif()
@@ -168,6 +177,7 @@ endif()
168177
ament_add_gtest(test_node_interfaces__node_graph
169178
node_interfaces/test_node_graph.cpp
170179
TIMEOUT 120)
180+
ament_add_test_label(test_node_interfaces__node_graph mimick)
171181
if(TARGET test_node_interfaces__node_graph)
172182
target_link_libraries(test_node_interfaces__node_graph ${PROJECT_NAME} mimick rcl::rcl ${test_msgs_TARGETS})
173183
endif()
@@ -178,21 +188,25 @@ if(TARGET test_node_interfaces__node_interfaces)
178188
endif()
179189
ament_add_gtest(test_node_interfaces__node_parameters
180190
node_interfaces/test_node_parameters.cpp)
191+
ament_add_test_label(test_node_interfaces__node_parameters mimick)
181192
if(TARGET test_node_interfaces__node_parameters)
182193
target_link_libraries(test_node_interfaces__node_parameters ${PROJECT_NAME} mimick rcpputils::rcpputils)
183194
endif()
184195
ament_add_gtest(test_node_interfaces__node_services
185196
node_interfaces/test_node_services.cpp)
197+
ament_add_test_label(test_node_interfaces__node_services mimick)
186198
if(TARGET test_node_interfaces__node_services)
187199
target_link_libraries(test_node_interfaces__node_services ${PROJECT_NAME} mimick rcl::rcl)
188200
endif()
189201
ament_add_gtest(test_node_interfaces__node_timers
190202
node_interfaces/test_node_timers.cpp)
203+
ament_add_test_label(test_node_interfaces__node_timers mimick)
191204
if(TARGET test_node_interfaces__node_timers)
192205
target_link_libraries(test_node_interfaces__node_timers ${PROJECT_NAME} mimick rcl::rcl)
193206
endif()
194207
ament_add_gtest(test_node_interfaces__node_topics
195208
node_interfaces/test_node_topics.cpp)
209+
ament_add_test_label(test_node_interfaces__node_topics mimick)
196210
if(TARGET test_node_interfaces__node_topics)
197211
target_link_libraries(test_node_interfaces__node_topics ${PROJECT_NAME} mimick rcl::rcl ${test_msgs_TARGETS})
198212
endif()
@@ -203,6 +217,7 @@ if(TARGET test_node_interfaces__node_type_descriptions)
203217
endif()
204218
ament_add_gtest(test_node_interfaces__node_waitables
205219
node_interfaces/test_node_waitables.cpp)
220+
ament_add_test_label(test_node_interfaces__node_waitables mimick)
206221
if(TARGET test_node_interfaces__node_waitables)
207222
target_link_libraries(test_node_interfaces__node_waitables ${PROJECT_NAME} mimick rcl::rcl)
208223
endif()
@@ -238,10 +253,12 @@ if(TARGET test_node_global_args)
238253
target_link_libraries(test_node_global_args ${PROJECT_NAME})
239254
endif()
240255
ament_add_gtest(test_node_options test_node_options.cpp)
256+
ament_add_test_label(test_node_options mimick)
241257
if(TARGET test_node_options)
242258
target_link_libraries(test_node_options ${PROJECT_NAME} mimick rcl::rcl)
243259
endif()
244260
ament_add_gtest(test_init_options test_init_options.cpp)
261+
ament_add_test_label(test_init_options mimick)
245262
if(TARGET test_init_options)
246263
target_link_libraries(test_init_options ${PROJECT_NAME} mimick rcl::rcl)
247264
endif()
@@ -270,6 +287,7 @@ if(TARGET test_parameter_map)
270287
target_link_libraries(test_parameter_map ${PROJECT_NAME} rcl::rcl rcl_yaml_param_parser::rcl_yaml_param_parser rcutils::rcutils)
271288
endif()
272289
ament_add_gtest(test_publisher test_publisher.cpp TIMEOUT 120)
290+
ament_add_test_label(test_publisher mimick)
273291
if(TARGET test_publisher)
274292
target_link_libraries(test_publisher ${PROJECT_NAME} mimick rcl::rcl rcutils::rcutils ${test_msgs_TARGETS})
275293
endif()
@@ -335,6 +353,7 @@ function(test_qos_event_for_rmw_implementation)
335353
ament_add_gmock(test_qos_event${target_suffix} test_qos_event.cpp
336354
ENV ${rmw_implementation_env_var}
337355
)
356+
ament_add_test_label(test_qos_event${target_suffix} mimick)
338357
if(TARGET test_qos_event${target_suffix})
339358
target_link_libraries(test_qos_event${target_suffix} ${PROJECT_NAME} mimick rcutils::rcutils rmw::rmw ${test_msgs_TARGETS})
340359
endif()
@@ -362,15 +381,18 @@ if(TARGET test_serialized_message)
362381
target_link_libraries(test_serialized_message ${PROJECT_NAME} rcpputils::rcpputils ${test_msgs_TARGETS})
363382
endif()
364383
ament_add_gtest(test_service test_service.cpp)
384+
ament_add_test_label(test_service mimick)
365385
if(TARGET test_service)
366386
target_link_libraries(test_service ${PROJECT_NAME} mimick ${rcl_interfaces_TARGES} ${test_msgs_TARGETS})
367387
endif()
368388
ament_add_gmock(test_service_introspection test_service_introspection.cpp)
389+
ament_add_test_label(test_service_introspection mimick)
369390
if(TARGET test_service_introspection)
370391
target_link_libraries(test_service_introspection ${PROJECT_NAME} mimick ${service_msgs_TARGETS} ${test_msgs_TARGETS})
371392
endif()
372393
# Creating and destroying nodes is slow with Connext, so this needs larger timeout.
373394
ament_add_gtest(test_subscription test_subscription.cpp TIMEOUT 120)
395+
ament_add_test_label(test_subscription mimick)
374396
if(TARGET test_subscription)
375397
target_link_libraries(test_subscription ${PROJECT_NAME} mimick ${test_msgs_TARGETS})
376398
endif()
@@ -421,6 +443,7 @@ endif()
421443

422444
ament_add_gtest(test_timer test_timer.cpp
423445
APPEND_LIBRARY_DIRS "${append_library_dirs}")
446+
ament_add_test_label(test_timer mimick)
424447
if(TARGET test_timer)
425448
target_link_libraries(test_timer ${PROJECT_NAME} mimick rcl::rcl)
426449
endif()
@@ -439,6 +462,7 @@ endif()
439462

440463
ament_add_gtest(test_utilities test_utilities.cpp
441464
APPEND_LIBRARY_DIRS "${append_library_dirs}")
465+
ament_add_test_label(test_utilities mimick)
442466
if(TARGET test_utilities)
443467
target_link_libraries(test_utilities ${PROJECT_NAME} mimick rcl::rcl)
444468
endif()
@@ -497,6 +521,7 @@ endif()
497521

498522
ament_add_gtest(test_static_single_threaded_executor executors/test_static_single_threaded_executor.cpp
499523
APPEND_LIBRARY_DIRS "${append_library_dirs}")
524+
ament_add_test_label(test_static_single_threaded_executor mimick)
500525
if(TARGET test_static_single_threaded_executor)
501526
target_link_libraries(test_static_single_threaded_executor ${PROJECT_NAME} mimick ${test_msgs_TARGETS})
502527
endif()
@@ -515,6 +540,7 @@ endif()
515540

516541
ament_add_gtest(test_executor_notify_waitable executors/test_executor_notify_waitable.cpp
517542
APPEND_LIBRARY_DIRS "${append_library_dirs}" TIMEOUT 120)
543+
ament_add_test_label(test_executor_notify_waitable mimick)
518544
if(TARGET test_executor_notify_waitable)
519545
target_link_libraries(test_executor_notify_waitable ${PROJECT_NAME} mimick rcpputils::rcpputils)
520546
endif()
@@ -532,6 +558,7 @@ endif()
532558

533559
ament_add_gtest(test_guard_condition test_guard_condition.cpp
534560
APPEND_LIBRARY_DIRS "${append_library_dirs}")
561+
ament_add_test_label(test_guard_condition mimick)
535562
if(TARGET test_guard_condition)
536563
target_link_libraries(test_guard_condition ${PROJECT_NAME} mimick)
537564
endif()
@@ -565,6 +592,7 @@ if(TARGET test_dynamic_storage)
565592
endif()
566593

567594
ament_add_gtest(test_storage_policy_common wait_set_policies/test_storage_policy_common.cpp)
595+
ament_add_test_label(test_storage_policy_common mimick)
568596
if(TARGET test_storage_policy_common)
569597
target_link_libraries(test_storage_policy_common ${PROJECT_NAME} mimick ${test_msgs_TARGETS})
570598
endif()
@@ -597,11 +625,13 @@ endif()
597625
ament_add_gtest(test_executor test_executor.cpp
598626
APPEND_LIBRARY_DIRS "${append_library_dirs}"
599627
TIMEOUT 120)
628+
ament_add_test_label(test_executor mimick)
600629
if(TARGET test_executor)
601630
target_link_libraries(test_executor ${PROJECT_NAME} mimick)
602631
endif()
603632

604633
ament_add_gtest(test_graph_listener test_graph_listener.cpp)
634+
ament_add_test_label(test_graph_listener mimick)
605635
if(TARGET test_graph_listener)
606636
target_link_libraries(test_graph_listener ${PROJECT_NAME} mimick)
607637
endif()
@@ -613,6 +643,7 @@ function(test_subscription_content_filter_for_rmw_implementation)
613643
ENV ${rmw_implementation_env_var}
614644
TIMEOUT 120
615645
)
646+
ament_add_test_label(test_subscription_content_filter${target_suffix} mimick)
616647
if(TARGET test_subscription_content_filter${target_suffix})
617648
target_link_libraries(test_subscription_content_filter${target_suffix} ${PROJECT_NAME} mimick ${test_msgs_TARGETS})
618649
endif()

rclcpp_action/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ if(BUILD_TESTING)
8080
add_subdirectory(test/benchmark)
8181

8282
ament_add_gtest(test_client test/test_client.cpp TIMEOUT 180)
83+
ament_add_test_label(test_client mimick)
8384
if(TARGET test_client)
8485
target_link_libraries(test_client
8586
${PROJECT_NAME}
@@ -93,6 +94,7 @@ if(BUILD_TESTING)
9394
endif()
9495

9596
ament_add_gtest(test_server test/test_server.cpp TIMEOUT 180)
97+
ament_add_test_label(test_server mimick)
9698
if(TARGET test_server)
9799
target_link_libraries(test_server
98100
${PROJECT_NAME}
@@ -104,6 +106,7 @@ if(BUILD_TESTING)
104106
endif()
105107

106108
ament_add_gtest(test_server_goal_handle test/test_server_goal_handle.cpp)
109+
ament_add_test_label(test_server_goal_handle mimick)
107110
if(TARGET test_server_goal_handle)
108111
target_link_libraries(test_server_goal_handle
109112
${PROJECT_NAME}

rclcpp_lifecycle/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ if(BUILD_TESTING)
9595
endif()
9696

9797
ament_add_gtest(test_lifecycle_node test/test_lifecycle_node.cpp TIMEOUT 120)
98+
ament_add_test_label(test_lifecycle_node mimick)
9899
if(TARGET test_lifecycle_node)
99100
target_link_libraries(test_lifecycle_node ${PROJECT_NAME} mimick rcl_lifecycle::rcl_lifecycle rclcpp::rclcpp rcutils::rcutils)
100101
endif()
@@ -103,6 +104,7 @@ if(BUILD_TESTING)
103104
target_link_libraries(test_lifecycle_publisher ${PROJECT_NAME} rcl_lifecycle::rcl_lifecycle rclcpp::rclcpp ${test_msgs_TARGETS})
104105
endif()
105106
ament_add_gtest(test_lifecycle_service_client test/test_lifecycle_service_client.cpp TIMEOUT 120)
107+
ament_add_test_label(test_lifecycle_service_client mimick)
106108
if(TARGET test_lifecycle_service_client)
107109
target_link_libraries(test_lifecycle_service_client
108110
${PROJECT_NAME}
@@ -113,6 +115,7 @@ if(BUILD_TESTING)
113115
rcutils::rcutils)
114116
endif()
115117
ament_add_gtest(test_client test/test_client.cpp TIMEOUT 120)
118+
ament_add_test_label(test_client mimick)
116119
if(TARGET test_client)
117120
target_link_libraries(test_client
118121
${PROJECT_NAME}
@@ -121,6 +124,7 @@ if(BUILD_TESTING)
121124
rclcpp::rclcpp)
122125
endif()
123126
ament_add_gtest(test_service test/test_service.cpp TIMEOUT 120)
127+
ament_add_test_label(test_service mimick)
124128
if(TARGET test_service)
125129
target_link_libraries(test_service
126130
${PROJECT_NAME}
@@ -145,6 +149,7 @@ if(BUILD_TESTING)
145149
target_link_libraries(test_state_wrapper ${PROJECT_NAME} rcl_lifecycle::rcl_lifecycle rclcpp::rclcpp)
146150
endif()
147151
ament_add_gtest(test_transition_wrapper test/test_transition_wrapper.cpp)
152+
ament_add_test_label(test_transition_wrapper mimick)
148153
if(TARGET test_transition_wrapper)
149154
target_link_libraries(test_transition_wrapper ${PROJECT_NAME} mimick rcl_lifecycle::rcl_lifecycle rclcpp::rclcpp rcutils::rcutils)
150155
target_compile_definitions(test_transition_wrapper

0 commit comments

Comments
 (0)