Skip to content

Resolve ros_distro selectors in package tests - #164

Merged
Tobias-Fischer merged 2 commits into
RoboStack:masterfrom
Tobias-Fischer:feat/distro-test-selectors
Oct 16, 2026
Merged

Tobias-Fischer merged 2 commits into
RoboStack:masterfrom
Tobias-Fischer:feat/distro-test-selectors

Conversation

@Tobias-Fischer

@Tobias-Fischer Tobias-Fischer commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

When a test file from tests/ is put into a recipe, if: selectors that test ros_distro are resolved. One test file can then serve several distributions, which matters once they share tests/ through extends. All other selectors (osx, win, …) are left unchanged for rattler-build.

tests:
  - script:
      - if: ros_distro in ["humble", "jazzy"]
        then:
          - if: osx
            then: export ROS_LOCALHOST_ONLY=1 && launch_test smoke_test.py
        else:
          - launch_test smoke_test.py

This replaces rendering distribution-specific tests with Jinja templates, as the distro template (Tobias-Fischer/ros-distro-template) did for robot_state_publisher. Tobias-Fischer/robostack-distros already uses these selectors in its shared tests for robot_state_publisher, ros2cli and rosidl_cli.

There's a new test for the resolution (vinca/test_distro_selectors.py); all 291 tests pass, ruff and pyrefly are clean, and the README has a short section.

🤖 Generated with Claude Code

@Tobias-Fischer
Tobias-Fischer force-pushed the feat/distro-test-selectors branch 2 times, most recently from 46e8dd0 to e5b291c Compare October 10, 2026 04:26
Tobias-Fischer and others added 2 commits October 16, 2026 06:41
Selectors that test ros_distro (e.g. if: ros_distro in ["humble", "jazzy"]) are
resolved when a test file is put into a recipe, so one test file serves several
distributions; platform selectors stay for rattler-build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tobias-Fischer

Copy link
Copy Markdown
Contributor Author

@traversaro this is ready for review/merge

@Tobias-Fischer
Tobias-Fischer merged commit 3d552f4 into RoboStack:master Oct 16, 2026
3 checks passed
@Tobias-Fischer
Tobias-Fischer deleted the feat/distro-test-selectors branch October 16, 2026 07:06
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