Skip to content

launch_yaml: cache and restore test environment#940

Open
mjcarroll wants to merge 1 commit intorollingfrom
mjcarroll/test_sequence
Open

launch_yaml: cache and restore test environment#940
mjcarroll wants to merge 1 commit intorollingfrom
mjcarroll/test_sequence

Conversation

@mjcarroll
Copy link
Copy Markdown
Member

@mjcarroll mjcarroll commented Jan 30, 2026

Several of the launch_yaml tests mutate the os.environ variable, which can yield some unexpected results depending on the sequence the tests are run. Use a fixture to cache and restore the original environment.

Assisted-by: Gemini CLI:2.0-Flash [glob, read_file, run_shell_command, web_fetch, google_web_search, grep_search, replace, write_file, git, gh, uv, invoke_agent]

@mjcarroll mjcarroll self-assigned this Jan 30, 2026
Several of the launch_yaml tests mutate the os.environ variable, which
can yield some unexpected results depending on the sequence the tests
are run. Use a fixture to cache and restore the original environment.

Signed-off-by: Michael Carroll <carroll.michael@gmail.com>
Copy link
Copy Markdown
Member

@christophebedard christophebedard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with green CI

We should probably do this in a bunch of packages.

@mjcarroll

This comment was marked as outdated.

@mjcarroll

This comment was marked as outdated.

@mjcarroll

This comment was marked as outdated.

@mjcarroll
Copy link
Copy Markdown
Member Author

Pulls: #940, ros2/launch_ros#542
Gist: https://gist.githubusercontent.com/mjcarroll/892025e2060edeba8af92073a0b8b821/raw/22c36fb0c652be55e73dc369b42ba37d513435ee/ros2.repos
BUILD args: --packages-above-and-dependencies launch_pytest launch_yaml test_launch_ros
TEST args: --packages-above launch_pytest launch_yaml test_launch_ros
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/19148

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

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