Skip to content

ci: run Tier 2 when sources a cmocka test compiles change - #2006

Merged
zackees merged 2 commits into
masterfrom
ci/tier2-follows-cmocka-sources
Oct 23, 2026
Merged

zackees merged 2 commits into
masterfrom
ci/tier2-follows-cmocka-sources

Conversation

@zackees

@zackees zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member

Maintainer request: add testing where it's missing.

Gap: Tier 2's cmocka tests compile sources from about 60 paths under plugins/, frontend/ and shared/ (test_ws_batch_order builds plugins/obs-websocket/src/requesthandler/RequestBatchHandler.cpp, the v4l2, pipewire, ffmpeg and frontend utility tests build theirs). ci/ci_scope.py only selected Tier 2 for libobs/, test/cmocka/, deps/ and the linked crates, so a PR changing one of those sources ran none of the tests that cover it until master. #1996 (obs-websocket submodule bump with a concurrency fix) skipped Tier 2 entirely.

Fix: repo_cmocka_source_paths() reads every ${CMAKE_SOURCE_DIR}/<path> from test/cmocka/CMakeLists.txt and tests.d/*.cmake, and scope() selects Tier 2 for a changed path under one of them, or for a gitlink above one (submodule bump). Top-level include roots (frontend, libobs-opengl) are ignored so every frontend change doesn't run Tier 2. No new workflow file.

RED → GREEN: test_tier2_follows_sources_cmocka_tests_compile and test_tier2_reads_the_real_cmocka_tests (the second asserts plugins/obs-websocket selects Tier 2 with the real build files) fail on the RED commit and pass on the GREEN one. test_ci_scope, test_master_push_scope, test_rust_scope and ./lint pass locally.

CI-only change: no features-ledger line.

Tier 2's cmocka tests build sources from plugins/, frontend/ and shared/
(test_ws_batch_order compiles plugins/obs-websocket's
RequestBatchHandler.cpp), but only libobs, test/cmocka, deps and the
linked crates selected the lane. A PR changing those sources, or bumping
a submodule such as obs-websocket (#1996), skipped the tests that cover
them until master. Read the ${CMAKE_SOURCE_DIR}/... paths from the
cmocka build files and select Tier 2 for changes under them; top-level
include roots are ignored.
@zackees
zackees enabled auto-merge October 23, 2026 23:19
@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit 0ee385f Oct 23, 2026
30 checks passed
@zackees
zackees deleted the ci/tier2-follows-cmocka-sources branch October 26, 2026 15:42
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.

1 participant