Closed rotu closed 3 years ago
fyi @piraka9011 I think the problem is that various ament tools either respect or don't respect the condition
flag.
discovered in https://github.com/ros2/rmw_cyclonedds/pull/232
Thanks, @mjeronimo!
@rotu You're welcome. Glad I could track it down.
Adding a conditional flag to disable cppcheck
<test_depend condition="$OSTYPE==linux-gnu">ament_cmake_cppcheck</test_depend>
causes a test failure on Linux and non-Linux platforms.Compare:
Enable cppcheck unconditionally: https://github.com/rotu/rmw_cyclonedds/actions/runs/232035117 Linux passes, Mac and Windows fail (because
ament_cmake_cppcheck
fails to pull in macros fromrcutils
; separate issue)Enable cppcheck only on linux: https://github.com/rotu/rmw_cyclonedds/actions/runs/231703783 Linux, Mac, and Windows all fail. This is unexpected on Linux because the condition should evaluate to true and so the test should continue to pass. It is unexpected on Mac and Windows, because the condition should evaluate to false and so the test should not be attempted
Disable cppcheck unconditionally: https://github.com/rotu/rmw_cyclonedds/actions/runs/231705143 All platforms pass since cppcheck is not attempted to run.