Raised in code review of #638.
Problem
crates/rdlp-ffmpeg/tests/ has no shared helper module, so each suite re-declares its own:
ffmpeg_available() — copied into 16 of 22 test files.
- An
ffprobe invocation with hand-written arg arrays — 11 files, each with slightly different -show_entries / -of handling and its own idea of what a failure looks like.
That last point is the real cost: the variants disagree on how to treat a failed probe, and at least one historical pattern in this repo scored a failed mux as a pass because it checked file size rather than decoding (the trap documented in #637/#638).
crates/rdlp-postprocess/tests/common/mod.rs already shows the right shape for this repo.
Done so far
#638 added crates/rdlp-ffmpeg/tests/common/mod.rs with ffmpeg_available, encoder_available, probe_audio_field, and decoded_audio_frames, and used it from the suites that PR introduced. The pre-existing 16 were deliberately left alone to keep that diff reviewable.
Scope
Mechanical and low-risk, but touches many files — worth doing as its own PR rather than riding along with a behavioral change.
Refs #638
Raised in code review of #638.
Problem
crates/rdlp-ffmpeg/tests/has no shared helper module, so each suite re-declares its own:ffmpeg_available()— copied into 16 of 22 test files.ffprobeinvocation with hand-written arg arrays — 11 files, each with slightly different-show_entries/-ofhandling and its own idea of what a failure looks like.That last point is the real cost: the variants disagree on how to treat a failed probe, and at least one historical pattern in this repo scored a failed mux as a pass because it checked file size rather than decoding (the trap documented in #637/#638).
crates/rdlp-postprocess/tests/common/mod.rsalready shows the right shape for this repo.Done so far
#638 added
crates/rdlp-ffmpeg/tests/common/mod.rswithffmpeg_available,encoder_available,probe_audio_field, anddecoded_audio_frames, and used it from the suites that PR introduced. The pre-existing 16 were deliberately left alone to keep that diff reviewable.Scope
crates/rdlp-ffmpeg/tests/tomod common.commontoo where they repeat (several suites probecodec_name/r_frame_ratethe same way).Mechanical and low-risk, but touches many files — worth doing as its own PR rather than riding along with a behavioral change.
Refs #638