From d4100f4707b1772387daea906afa467fe9806705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 29 Sep 2026 03:47:26 +0300 Subject: [PATCH] stream: the 444 pin arm also honours the repo-wide EC_REQUIRE_FIXTURES The require-env for a missing fixture is now one name across the repo, so a batch unit sets EC_REQUIRE_FIXTURES=1 once and an absent fixture fails in ec-av1, ec-h264, ec-flac and ec-opus alike. EC_AV1_REQUIRE_AOMENC still works here, since it already means 'this box must have the oracle'. --- crates/ec-av1/src/stream.rs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 8a5d2325..a807170e 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -6490,28 +6490,34 @@ pub(crate) mod tests { } // lane-av1skipfix: this arm used to be a bare SKIP, so on any box // without the pin (the root `fixtures/` directory is GITIGNORED -- - // `.gitignore:2` -- so a fresh clone can never have it) the gate - // reported green having decoded nothing. `EC_AV1_REQUIRE_AOMENC=1` - // turns it into a hard failure naming the missing pin and its exact - // regeneration recipe, so a batch run cannot report green off it. + // `.gitignore:2` -- so a fresh clone, and every linked worktree, can + // never have it) the gate reported green having decoded nothing. + // `EC_REQUIRE_FIXTURES=1` -- the repo-wide fixture env, same as the + // ec-h264/ec-flac/ec-opus conformance gates -- or this crate's own + // `EC_AV1_REQUIRE_AOMENC=1` turns it into a hard failure naming the + // missing pin, the exact regeneration recipe and the + // `EC_AV1_PIN_DIR` override, so a batch run cannot report green off it. let pin = pin_dir().join("ll444-lossless-key.obu"); let stream = match std::fs::read(&pin) { Ok(stream) => stream, Err(e) => { assert!( - std::env::var_os("EC_AV1_REQUIRE_AOMENC").is_none(), + std::env::var_os("EC_REQUIRE_FIXTURES").is_none() + && std::env::var_os("EC_AV1_REQUIRE_AOMENC").is_none(), "{NAME}: the pinned 4:4:4 lossless key frame is missing at {} ({e}). \ - Regenerate it with `testsrc2 128x96` yuv444p 6 frames, aomenc \ - --profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0, \ - cut to the key frame's OBUs -- or point EC_AV1_PIN_DIR at a \ - directory that has it.", + This gate would prove nothing. A worktree has no gitignored root \ + `fixtures/`: run scripts/link-fixtures.sh. No script generates this \ + pin -- regenerate it with `testsrc2 128x96` yuv444p 6 frames, aomenc \ + --profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0, cut to \ + the key frame's OBUs -- or point EC_AV1_PIN_DIR at a directory that has it.", pin.display() ); eprintln!( "SKIP {NAME}: no pinned bytes at {} ({e}) -- this gate decoded nothing \ - and proves nothing; regenerate with `testsrc2 128x96` yuv444p 6 \ - frames, aomenc --profile=1 --lossless=1 --enable-palette=0 \ - --enable-intrabc=0, cut to the key frame's OBUs", + and proves nothing; run scripts/link-fixtures.sh, or regenerate with \ + `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 \ + --enable-palette=0 --enable-intrabc=0, cut to the key frame's OBUs \ + (or set EC_REQUIRE_FIXTURES=1 to make this a failure).", pin.display() ); return;