Skip to content

Conversation

MikeWrock
Copy link
Contributor

I don't know if anyone else had this issue, but although the docs states:

Extraction
Command line argument extraction happens within rcl. When an instance of the --ros-args flag is found in argv, until either a double dash token (--) is found or the end of the argument array is reached, all arguments that follow are taken as ROS specific arguments to be parsed as such. Remaining arguments can still be accessed by the user via rcl API.

I don't think the double dash of "--gtest_output=xml:${result_file}" counts. In my ros2_control fork using generate_parameter_library I get the following error without the trailing "--":

  • joint_limits_rosparam_test
    <<< failure message
    -- run_test.py: invoking following command in '/home/wrock/colcon_ws/build/joint_limits':
    • /home/wrock/colcon_ws/build/joint_limits/joint_limits_rosparam_test --ros-args --params-file /home/wrock/colcon_ws/src/ros2_control/joint_limits/test/joint_limits_rosparam.yaml --gtest_output=xml:/home/wrock/colcon_ws/build/joint_limits/test_results/joint_limits/joint_limits_rosparam_test.gtest.xml
      terminate called after throwing an instance of 'rclcpp::exceptions::UnknownROSArgsError'
      what(): found unknown ROS arguments: '--gtest_output=xml:/home/wrock/colcon_ws/build/joint_limits/test_results/joint_limits/joint_limits_rosparam_test.gtest.xml'
      -- run_test.py: return code -6
      -- run_test.py: generate result file '/home/wrock/colcon_ws/build/joint_limits/test_results/joint_limits/joint_limits_rosparam_test.gtest.xml' with failed test
      -- run_test.py: verify result file '/home/wrock/colcon_ws/build/joint_limits/test_results/joint_limits/joint_limits_rosparam_test.gtest.xml'

With this change, the tests run successfully

@tylerjw tylerjw merged commit 7e8a89f into PickNikRobotics:main Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants