Skip to content

Exposing test utility headers for use in other packages #3683

@paulbovbel

Description

@paulbovbel

Feature request

Feature description

While creating tests for internal behaviours, we've reused some of the handy utility helpers in https://github.com/ros-planning/navigation2/tree/main/nav2_behavior_tree/test/utils. However, since those headers are behind a BUILD_TESTING flag, they're not installed in binary distributions, and so aren't possible to use in tests from another source package. It would be great to find a way to make those reusable in other packages.

Implementation considerations

IMO there's basically two approaches here:

  • install the test/utility headers regardless of BUILD_TESTING. This leaks those headers outside of a test builds, but.. it's just a few headers
  • Create a ~nav2_test_utils type of package, that contains these test utils, is a test_depends for nav2_behavior_tree and other packages that require these kinds of utilities.
  • Suboptimally nothing, and we can duplicate the headers in our test packages, for better or worse.

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