You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: Automated coverage for the GPU light's frontend half #943
Two parts of the light live only in frontend C++ (frontend/utility/GpuStatus.cpp) and have no automated test:
reading the active adapter name, which was broken: it returned OpenGL;
the one-second frame-time sampling feeding FrameStats::from_samples.
The Rust classifier has 36 Tier 1 tests, but the bug was in the data the frontend passed to it.
Proposal
In Rust, treat a bare API name (OpenGL, Direct3D 11, Metal) passed as the adapter as a caller bug: log it once and report it in the JSON (adapterIsApiName: true). Tier 4 can then assert on it on every platform.
Make the sampling logic (ring buffer of 15, skip zeros) a small pure class with a frontend unit test in frontend/tests, if that harness builds in CI; otherwise move the logic into Rust.
Acceptance criteria
RED: a test that passes OpenGL as the adapter fails before the change, and so does a sampler test that pushes 20 samples and expects the last 15.
GREEN: both pass in CI.
Decisions
Prefer moving logic into Rust, where Tier 1 already runs on three OSes, over adding a new C++ test harness.
Activity
obs-gpu-status: Add failing tests for FrameWindow and the API-name fl…
obs-gpu-status: Move the frame-time window into Rust and flag API-nam…
obs-gpu-status: Move the frame-time window into Rust and flag API-nam…