From 1e834e4c20e2e970e17c83fbe022294ac63613ad Mon Sep 17 00:00:00 2001 From: Bartosz Burda Date: Sat, 20 Jun 2026 09:27:20 +0200 Subject: [PATCH] test(diagnostic_bridge): label test_integration as an integration test add_launch_test() defaults the launch test's ctest LABELS to "launch_test", which the unit selector (colcon test -LE 'linter|integration') does not exclude. So the launch test ran in the unit phase together with all other unit tests in a single colcon invocation; under that load the node could miss the launch SIGINT shutdown window and get killed with SIGTERM, failing the post-shutdown exit-code check. Override the label to "integration" via set_tests_properties (the repo convention) so it runs only in the integration phase. No code change. --- src/ros2_medkit_diagnostic_bridge/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ros2_medkit_diagnostic_bridge/CMakeLists.txt b/src/ros2_medkit_diagnostic_bridge/CMakeLists.txt index b886c180b..647c62aea 100644 --- a/src/ros2_medkit_diagnostic_bridge/CMakeLists.txt +++ b/src/ros2_medkit_diagnostic_bridge/CMakeLists.txt @@ -122,11 +122,20 @@ if(BUILD_TESTING) DESTINATION share/${PROJECT_NAME} ) + # add_launch_test() defaults the test's ctest LABELS to "launch_test", which + # the unit selector (colcon test -LE 'linter|integration') does not exclude, + # so the launch test ran in the unit phase together with all other unit tests + # in one colcon invocation. Under that load the node could miss the launch + # SIGINT shutdown window and get killed with SIGTERM, failing the + # post-shutdown exit-code check. Override the label to "integration" via + # set_tests_properties (the repo convention) so it runs only in the + # integration phase. add_launch_test( test/test_integration.test.py TARGET test_integration TIMEOUT 60 ) + set_tests_properties(test_integration PROPERTIES LABELS "integration") ros2_medkit_relax_vendor_warnings() endif()