Skip to content

Use GTEST_SKIP in unsupported tests#604

Open
scpeters wants to merge 3 commits intomainfrom
scpeters/skip_unsupported_tests
Open

Use GTEST_SKIP in unsupported tests#604
scpeters wants to merge 3 commits intomainfrom
scpeters/skip_unsupported_tests

Conversation

@scpeters
Copy link
Copy Markdown
Member

@scpeters scpeters commented Apr 16, 2026

🦟 Bug fix

Part of gazebosim/gz-rendering#1235

Summary

While checking whether gz-sensors tests are using ogre2 on macOS, I noticed that very few tests are using GTEST_SKIP() for unsupported engines, so this switches the gzdbg stream then return pattern to stream directly to GTEST_SKIP() as is done in gz-rendering.

On Ubuntu, this shows an increase of 1 skipped test:

On macOS, there are many new skipped tests due to the removal of ogre1.9 in osrf/homebrew-simulation#3394 (see follow-up work in #605).

This also fixes a segfault of INTEGRATION_dvl when the render engine plugin fails to load, which also started failing on macOS when ogre1.9 was removed in osrf/homebrew-simulation#3394.

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
The TearDown unconditionally dereferences the
engine pointer, which segfaults if the engine failed
to load. Check the pointer before dereferencing.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters marked this pull request as ready for review April 16, 2026 18:03
@scpeters scpeters requested a review from iche033 as a code owner April 16, 2026 18:03
Print the relevant github issue in the GTEST_SKIP() message.

Signed-off-by: Steve Peters <scpeters@intrinsic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants