Repository navigation
ci: run Tier 2 when sources a cmocka test compiles change - #2006
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maintainer request: add testing where it's missing.
Gap: Tier 2's cmocka tests compile sources from about 60 paths under
plugins/,frontend/andshared/(test_ws_batch_orderbuildsplugins/obs-websocket/src/requesthandler/RequestBatchHandler.cpp, the v4l2, pipewire, ffmpeg and frontend utility tests build theirs).ci/ci_scope.pyonly selected Tier 2 forlibobs/,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>fromtest/cmocka/CMakeLists.txtandtests.d/*.cmake, andscope()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_compileandtest_tier2_reads_the_real_cmocka_tests(the second assertsplugins/obs-websocketselects 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_scopeand./lintpass locally.CI-only change: no features-ledger line.