Skip to content

test: keep the cmocka test graph in name order (Refs #1997) - #2011

Merged
zackees merged 2 commits into
masterfrom
test/1997-sorted-test-graph
Oct 24, 2026
Merged

zackees merged 2 commits into
masterfrom
test/1997-sorted-test-graph

Conversation

@zackees

@zackees zackees commented Oct 23, 2026

Copy link
Copy Markdown
Member

Refs #1997 (part 3, test graph)

Every port adds a cmocka test to test/cmocka/build/test-graph.json, appending it at the end of the targets and tests maps. Two open PRs that each add a test then edit the same hunk, and the second is ejected from the merge queue (#1929 vs #1934). Kept in name order, independent additions land in different places.

  • RED 1st commit: new ci/test_test_graph_sorted.py (auto-discovered by ./lint) fails on master, because both maps are in insertion order.
  • GREEN 2nd commit: the maps are sorted with uv run ci/test_test_graph_sorted.py --fix. Only the order changes: 2245 lines moved, the content is identical, and the other top-level keys and the formatting (2-space JSON, as the file already used) are unchanged.

Readers don't depend on the order. obs-build loads both maps into a BTreeMap, and CMake and the ci/ tests look tests up by name. Checked locally:

  • soldr cargo test -p obs-studio-rust --test obs-tests-app native_build passes (35 tests);
  • ci/test_cmocka_mbedtls_graph.py, test_cmocka_windows_diagnostics.py, test_rust_scope.py and test_tier2_concurrency.py all pass;
  • ./lint is clean.

Open PRs that add a test-graph entry will need a rebase once this lands; --fix re-sorts after resolving.

@zackees
zackees enabled auto-merge October 23, 2026 23:45
@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit 7c36810 Oct 24, 2026
31 checks passed
@zackees
zackees deleted the test/1997-sorted-test-graph branch October 26, 2026 15:46
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