Skip to content

test: Consolidate Rust integration tests into category binaries; lint a cap on test targets #968

Closed

Description

@zackees

Refs #700, #897; zackees/ci.yml RUST-005/RUST-012 (soldr#2934 precedent: 98 files → 8 category targets).

Problem

Every rust/*/tests/*.rs file is its own test executable: 154 files across 11 crates (obs-util 73, obs-graphics 32, obs-media-io 25, obs-codec 9, the rest 1–4). Each target builds and links all of them. On the cross lane that's about 60 s per target, and the same cost is paid in Linux tests, native macOS/Windows tests and the local gate.

Change

  1. Consolidate: move each crate's tests/*.rs into category binaries tests/<category>/main.rs (mod per old file), at most 8 per crate, grouped by module (obs-util: threading, pipe, platform, config, strings/utf8, containers, serializer, parity, …). Pure moves: test bodies don't change, and every test still runs (same test count before and after).
  2. Cap lint: ci/test_binary_cap.py (wired into ./lint) counts the integration-test targets Cargo would build per crate (top-level tests/*.rs plus tests/*/main.rs plus explicit [[test]]). It fails over 8 per crate, or over a workspace total cap (the post-consolidation count), with ci/test_binary_cap.py --report.

Acceptance

  • soldr cargo test --workspace passes with the same number of tests as before.
  • Test executables per target drop from ~154 to ≤ ~22.
  • RED: the cap lint fails on master; GREEN: it passes after consolidation.

Activity

  1. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Claiming: #968

    1. RED: ci/test_binary_cap.py + unit test, wired into ./lint; fails on master.
    2. GREEN: consolidate each crate's tests/*.rs into <=8 category binaries (git mv, pure moves).
    3. Verify test counts identical; draft PR today.
  2. added
    claimed
    on Oct 16, 2026
  3. github-actions commented on Oct 16, 2026

    @github-actions

    Claim bot: claimed by @zackees. It expires after 48 h (8 h on critical issues) without a progress comment here or a push, comment or review on a linked PR.

  4. added 18 commits that reference this issue on Oct 16, 2026
    76fce42
    3acf7b3
    cec49b0
    091f484
    faa5f77
    58b3b50
    e8bd00c
    cd69ce5
    7d25667
    34c1b9d
    f92938e
    3cfc2dc
    fd3dd48
    54046da
    60a3b8e
    8e7dfd9
    71dfb4d
    d0770a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

claimed

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions