forge
Explore
Log in

Don't you dare go Hollow

Drop remaining SKIP branches and stale opt-in docs in ec-h264/ec-h265 tests; missing fixture dirs panic instead of silently empty

Browse files at this commit

1eb7f8c2f383d3386f78d76e9225cd932272a933Ahmet Kaan GümüşParent: b5a0942
crates/ec-h264/tests/conformance.rsmodified+0 -3
@@ -1401,9 +1401,6 @@ fn switching_slices_are_refused_by_name() {
14011401 }
14021402 }
14031403
1404-// ---------------------------------------------------------------------------
1405-// Real library: the files actually on this machine, not fixtures.
1406-// ---------------------------------------------------------------------------
14071404
14081405 /// Extract the video elementary stream of a real file as Annex B.
14091406 fn extract_annexb(src: &Path, dst: &Path, frames: usize) -> bool {
crates/ec-h264/tests/it/high422.rsmodified+1 -7
@@ -3,8 +3,6 @@
33 //! with B-frames, CABAC and CAVLC, the 8x8 transform, weighted prediction,
44 //! scaling matrices, chroma QP offsets, several slices, progressive and
55 //! MBAFF, at 8 and 10 bits.
6-//!
7-//! opt-in: set `EC_H264_HI422_HD=1` (the lane gate does).
86
97 use std::path::{Path, PathBuf};
108
@@ -365,13 +363,9 @@ fn x264_hi422_mbaff() {
365363 sweep(&cases);
366364 }
367365
368-/// 1920x1080 intra and long-GOP, progressive and MBAFF (opt-in, slow).
366+/// 1920x1080 intra and long-GOP, progressive and MBAFF (slow).
369367 #[test]
370368 fn x264_hi422_hd() {
371- if std::env::var_os("EC_H264_HI422_HD").is_none() {
372- eprintln!("SKIP x264_hi422_hd: set EC_H264_HI422_HD=1");
373- return;
374- }
375369 sweep(&[
376370 case("hd-i-cabac", "testsrc2", "1920x1080", 2, "keyint=1"),
377371 case(
crates/ec-h264/tests/it/high422_jvt.rsmodified+0 -6
@@ -99,12 +99,6 @@ fn jvt_hi422_vectors_bit_exact() {
9999 let mut exact = Vec::new();
100100 for path in &list {
101101 let name = path.file_stem().unwrap().to_string_lossy().to_string();
102- if cfg!(debug_assertions)
103- && matches!(name.as_str(), "Hi422FREXT16_SONY_A" | "Hi422FREXT17_SONY_A")
104- {
105- eprintln!("SKIP {name}: 1920x1088 field stream, release builds only");
106- continue;
107- }
108102 let bytes = std::fs::read(path).unwrap();
109103 let (ours, format) = match decode_all(&bytes) {
110104 Ok(v) => v,
crates/ec-h264/tests/it/high444.rsmodified+1 -7
@@ -9,8 +9,6 @@
99 //! on the luma plane against ffmpeg's `gray` / `gray10le`; chroma must be 128,
1010 //! or 512 at 10 bits). Separate colour planes cannot be written by x264; the
1111 //! JVT vectors (`high444_jvt.rs`) cover them.
12-//!
13-//! set `EC_H264_HI444_HD=1`.
1412
1513 use std::path::{Path, PathBuf};
1614
@@ -604,13 +602,9 @@ fn x264_monochrome_mbaff_and_lossless() {
604602 sweep("gray MBAFF / lossless", &cases);
605603 }
606604
607-/// 1280x720 (opt-in, slow).
605+/// 1280x720 (slow).
608606 #[test]
609607 fn x264_hi444_hd() {
610- if std::env::var_os("EC_H264_HI444_HD").is_none() {
611- eprintln!("SKIP x264_hi444_hd: set EC_H264_HI444_HD=1");
612- return;
613- }
614608 let base = [
615609 case("hd-i-cabac", "testsrc2", "1280x720", 2, "keyint=1"),
616610 case(
crates/ec-h264/tests/it/high444_jvt.rsmodified+0 -5
@@ -212,10 +212,6 @@ fn jvt_hi444_vectors_bit_exact() {
212212 let mut summary = Vec::new();
213213 for path in &list {
214214 let name = path.file_stem().unwrap().to_string_lossy().to_string();
215- if cfg!(debug_assertions) && std::fs::metadata(path).map_or(0, |m| m.len()) > 2_000_000 {
216- eprintln!("SKIP {name}: large stream, release builds only");
217- continue;
218- }
219215 let bytes = std::fs::read(path).unwrap();
220216 let (ours, format) = match decode_all(&bytes) {
221217 Ok((f, fmt)) if !f.is_empty() => (f, fmt),
@@ -227,7 +223,6 @@ fn jvt_hi444_vectors_bit_exact() {
227223 Err(e) if e.to_string().contains("FMO") => {
228224 // The Sejong Univ. streams use slice groups, which this
229225 // decoder refuses by name (not part of this lane).
230- eprintln!("SKIP {name}: {e}");
231226 summary.push(format!("{name} fmo-refused"));
232227 continue;
233228 }
crates/ec-h264/tests/it/mbaff_x264.rsmodified+1 -7
@@ -3,8 +3,6 @@
33 //! sources: CABAC and CAVLC, top and bottom field first, B-frames with
44 //! spatial and temporal direct, weighted prediction, the 8x8 transform,
55 //! several slices, and High 10.
6-//!
7-//! opt-in: set `EC_H264_MBAFF_HD=1` (the lane gate does).
86
97 use std::path::{Path, PathBuf};
108
@@ -357,13 +355,9 @@ fn x264_mbaff_sd() {
357355 ]);
358356 }
359357
360-/// 1920x1080: opt-in (`EC_H264_MBAFF_HD=1`).
358+/// 1920x1080.
361359 #[test]
362360 fn x264_mbaff_hd() {
363- if std::env::var_os("EC_H264_MBAFF_HD").is_none() {
364- eprintln!("SKIP 1080p MBAFF sweep: set EC_H264_MBAFF_HD=1");
365- return;
366- }
367361 sweep(&[
368362 case(
369363 "hd-cabac-tff",
crates/ec-h265/tests/it/conformance_intra.rsmodified+1 -3
@@ -47,9 +47,7 @@ fn streams() -> Vec<PathBuf> {
4747 }
4848 }
4949 }
50- let Ok(dirs) = std::fs::read_dir(&root) else {
51- return Vec::new();
52- };
50+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
5351 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
5452 dirs.sort();
5553 dirs.into_iter()
crates/ec-h265/tests/it/conformance_rext.rsmodified+1 -3
@@ -46,9 +46,7 @@ fn streams() -> Vec<PathBuf> {
4646 }
4747 }
4848 }
49- let Ok(dirs) = std::fs::read_dir(&root) else {
50- return Vec::new();
51- };
49+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
5250 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
5351 dirs.sort();
5452 dirs.into_iter()
crates/ec-h265/tests/it/cu_syntax.rsmodified+1 -3
@@ -23,9 +23,7 @@ fn streams() -> Vec<PathBuf> {
2323 }
2424 }
2525 }
26- let Ok(dirs) = std::fs::read_dir(&root) else {
27- return Vec::new();
28- };
26+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
2927 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
3028 dirs.sort();
3129 dirs.into_iter()
crates/ec-h265/tests/it/dec_shell.rsmodified+1 -3
@@ -310,9 +310,7 @@ fn streams() -> Vec<PathBuf> {
310310 }
311311 }
312312 }
313- let Ok(dirs) = std::fs::read_dir(&root) else {
314- return Vec::new();
315- };
313+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
316314 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
317315 dirs.sort();
318316 dirs.into_iter()
crates/ec-h265/tests/it/real_library.rsmodified+0 -1
@@ -1,4 +1,3 @@
1-//!
21 //! Every file either decodes bit-exactly, is refused by name (a pixel format or
32 //! a bit depth outside 4:2:0 8/10-bit, or a decoder refusal that says
43 //! "unsupported"), or fails. A refusal is reported, not counted as a failure.