Skip to content

test: Register the VLC channel order test only for a real vlc-video module - #254

Merged
zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:fix/vlc-test-without-vlc
Oct 11, 2026
Merged

zackees merged 1 commit into
obs-rust:masterfrom
rdoupe:fix/vlc-test-without-vlc

Conversation

@rdoupe

@rdoupe rdoupe commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Description

Configuring with unit tests on and the VLC plugin off (-DENABLE_UNIT_TESTS=ON -DENABLE_VLC=OFF) fails since #252: add_core_module() leaves a dummy custom target named vlc-video when the module is disabled, so the registration's TARGET vlc-video check passes and $<TARGET_FILE:vlc-video> breaks the generate step. The test is now registered only when vlc-video is a MODULE_LIBRARY.

Motivation and Context

Fixes #253 (regression from #252, my VLC channel order fix).

How Has This Been Tested?

  • ENABLE_VLC=OFF build tree, unit tests on: master fails to generate (Target "vlc-video" is not an executable or library); with this change it configures and builds in both lanes (ENABLE_RUST_LIBOBS OFF and ON), and the full ctest passes (85 of 85 in each lane, with the test correctly absent).
  • ENABLE_VLC=ON build tree: the test is still registered and passes with libVLC 3.0.23 under a private Xvfb.
  • gersemi and ci/test_registration.py are clean.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.
  • I have used AI tooling in the creation of this PR
  • I am an AI agent being used to assist with this pull request: Claude Code (Claude Opus 5.5) wrote the code, commit message and this text under the submitter's direction, and ran the checks above on the submitter's machines.

🤖 Generated with Claude Code

…odule

With ENABLE_VLC=OFF, add_core_module() leaves a dummy custom target named
vlc-video behind. The registration only checked TARGET vlc-video, so it
still evaluated $<TARGET_FILE:vlc-video> and CMake's generate step failed:
any unit-test build without the VLC plugin stopped configuring after obs-rust#252.

Check that vlc-video is a MODULE_LIBRARY before registering the test.

Fixes obs-rust#253.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@rdoupe
rdoupe requested a review from zackees as a code owner October 11, 2026 19:30
@zackees
zackees merged commit 3e4a875 into obs-rust:master Oct 11, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: test: configuring unit tests with ENABLE_VLC=OFF fails (vlc-video is not a library)

2 participants