From a05000810ab6d1750184d2b827611d84cdc17f18 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sat, 19 Sep 2026 01:33:17 -0700 Subject: [PATCH] test(tools): ffmpeg round-trip test skips when the ffmpeg on PATH cannot run which("ffmpeg") is true on CI runners whose ffmpeg exits 127, so the "if available" test failed on unrelated PRs (runs 35426109735, 35429954462). Availability means the synthesis step succeeds; otherwise skip with the exit code. --- tests/tools/test_tts_container_repair.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/tools/test_tts_container_repair.py b/tests/tools/test_tts_container_repair.py index d4f898fc1b..35c266efc4 100644 --- a/tests/tools/test_tts_container_repair.py +++ b/tests/tools/test_tts_container_repair.py @@ -67,13 +67,16 @@ class TestRepairOggContainer: if not _shutil.which("ffmpeg"): pytest.skip("ffmpeg not installed") - # Synthesize a real tiny mp3 with ffmpeg, misname it .ogg + # Synthesize a real tiny mp3 with ffmpeg, misname it .ogg. "Available" means the binary + # runs AND carries the encoder: CI runners have shipped an ffmpeg on PATH that exits 127. p = tmp_path / "v.ogg" - _sp.run( + synth = _sp.run( ["ffmpeg", "-f", "lavfi", "-i", "sine=frequency=440:duration=0.3", "-acodec", "libmp3lame", "-f", "mp3", str(p), "-y"], - capture_output=True, check=True, + capture_output=True, check=False, ) + if synth.returncode != 0: + pytest.skip(f"ffmpeg on PATH cannot synthesize mp3 (exit {synth.returncode})") assert _sniff_audio_container(str(p)) == "mp3" result = _repair_ogg_container(str(p)) assert result == str(p)