Skip to content

I would like to extend run_test.py to provide ROS_DOMAIN_ID isolation #172

@pbaughman

Description

@pbaughman

There's a function in launch_testing that picks a ROS_DOMAIN_ID between 1 and 100 that's unique on a given machine that's used to run launch_tests in isolation.

I'd like to use the same mechanism to allow ament_cmake_test's run_test.py to provide isolation for gtests and pytests. run_test.py. I'd like to accomplish this by doing the following:

  1. Refactor the domain_coordinator into its own python package so launch_testing and ament_cmake_test can both use it.
  2. Change run_test.py to use the same logic as launch_test. If no ROS_DOMAIN_ID is set, set a unique one in the environment of the test. If ROS_DOMAIN_ID is already set, we don't do anything - just use that same ROS_DOMAIN_ID
  3. Plumb an argument to ament_add_gtest and ament_add_pytest down into ament_add_test to disable the isolation behavior. This argument matches the one from launch_testing

Before I start, I want to find out if anybody has strong opinions about this. @tfoote first mentioned solving this problem here ros2/launch#251 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions