From 2550e68cc12336672aeb4debac952521cc3279c0 Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Wed, 20 Dec 2023 23:34:17 -0500 Subject: [PATCH 1/6] Increase timeout for rclcpp_lifecycle to 360 Signed-off-by: Jorge Perez --- rclcpp_lifecycle/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index f46f993b21..d12bfd47a9 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -159,3 +159,8 @@ ament_export_targets(${PROJECT_NAME}) ament_export_dependencies(lifecycle_msgs rcl rclcpp rcl_interfaces rcl_lifecycle rcutils rosidl_typesupport_cpp) ament_package() + +if(TEST cppcheck) + # must set the property after ament_package() + set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) +endif() From 0d73791a6e1e7f8c8889c27b1a6949ae46215b0e Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Thu, 21 Dec 2023 19:33:17 -0500 Subject: [PATCH 2/6] Change cppcheck configuration Signed-off-by: Jorge Perez --- rclcpp_lifecycle/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index d12bfd47a9..ebd0584cf5 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -61,6 +61,7 @@ if(BUILD_TESTING) # Give cppcheck hints about macro definitions coming from outside this package set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_INCLUDE_DIRS}) ament_lint_auto_find_test_dependencies() + set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) find_package(performance_test_fixture REQUIRED) @@ -160,7 +161,3 @@ ament_export_dependencies(lifecycle_msgs rcl rclcpp rcl_interfaces rcl_lifecycle ament_package() -if(TEST cppcheck) - # must set the property after ament_package() - set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) -endif() From 9e2db39618cc64a1a4dc9424342cf3ccd325174c Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Fri, 22 Dec 2023 10:56:19 -0500 Subject: [PATCH 3/6] Add lines to explicitly add test Signed-off-by: Jorge Perez --- rclcpp_lifecycle/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index ebd0584cf5..6c02bdb4d5 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -61,6 +61,9 @@ if(BUILD_TESTING) # Give cppcheck hints about macro definitions coming from outside this package set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_INCLUDE_DIRS}) ament_lint_auto_find_test_dependencies() + + find_package(ament_cmake_cppcheck REQUIRED) + ament_cppcheck() set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) find_package(performance_test_fixture REQUIRED) From 17d2711e73156878d990e93bbc472f61f03feba7 Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Tue, 2 Jan 2024 10:49:31 -0500 Subject: [PATCH 4/6] Remove explicit add for cppcheck Signed-off-by: Jorge Perez --- rclcpp_lifecycle/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index 6c02bdb4d5..86a73de05c 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -63,7 +63,7 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() find_package(ament_cmake_cppcheck REQUIRED) - ament_cppcheck() + # cppcheck is being added elsewhere set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) find_package(performance_test_fixture REQUIRED) From 65e8e287f0160ac8b7218d9546fd978c6574d3a4 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Tue, 2 Jan 2024 19:16:34 +0000 Subject: [PATCH 5/6] Add in cppcheck manually. Signed-off-by: Chris Lalancette --- rclcpp_lifecycle/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index 86a73de05c..f90c43afe6 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -60,10 +60,11 @@ if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) # Give cppcheck hints about macro definitions coming from outside this package set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_INCLUDE_DIRS}) + list(APPEND AMENT_LINT_AUTO_EXCLUDE "ament_cmake_cppcheck") ament_lint_auto_find_test_dependencies() find_package(ament_cmake_cppcheck REQUIRED) - # cppcheck is being added elsewhere + ament_cppcheck() set_tests_properties(cppcheck PROPERTIES TIMEOUT 360) find_package(performance_test_fixture REQUIRED) From 313390befe57bc44bdd6ed61ada446c3d114da04 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Tue, 2 Jan 2024 19:17:23 +0000 Subject: [PATCH 6/6] Remove unnecessary whitespace. Signed-off-by: Chris Lalancette --- rclcpp_lifecycle/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/rclcpp_lifecycle/CMakeLists.txt b/rclcpp_lifecycle/CMakeLists.txt index f90c43afe6..66b1990ec5 100644 --- a/rclcpp_lifecycle/CMakeLists.txt +++ b/rclcpp_lifecycle/CMakeLists.txt @@ -164,4 +164,3 @@ ament_export_targets(${PROJECT_NAME}) ament_export_dependencies(lifecycle_msgs rcl rclcpp rcl_interfaces rcl_lifecycle rcutils rosidl_typesupport_cpp) ament_package() -