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() {
1401 }1401 }
1402 }1402 }
1403 1403
1404-// ---------------------------------------------------------------------------
1405-// Real library: the files actually on this machine, not fixtures.
1406-// ---------------------------------------------------------------------------
1407 1404
1408 /// Extract the video elementary stream of a real file as Annex B.1405 /// Extract the video elementary stream of a real file as Annex B.
1409 fn extract_annexb(src: &Path, dst: &Path, frames: usize) -> bool {1406 fn extract_annexb(src: &Path, dst: &Path, frames: usize) -> bool {
crates/ec-h264/tests/it/high422.rsmodified+1 -7
@@ -3,8 +3,6 @@
3 //! with B-frames, CABAC and CAVLC, the 8x8 transform, weighted prediction,3 //! with B-frames, CABAC and CAVLC, the 8x8 transform, weighted prediction,
4 //! scaling matrices, chroma QP offsets, several slices, progressive and4 //! scaling matrices, chroma QP offsets, several slices, progressive and
5 //! MBAFF, at 8 and 10 bits.5 //! MBAFF, at 8 and 10 bits.
6-//!
7-//! opt-in: set `EC_H264_HI422_HD=1` (the lane gate does).
8 6
9 use std::path::{Path, PathBuf};7 use std::path::{Path, PathBuf};
10 8
@@ -365,13 +363,9 @@ fn x264_hi422_mbaff() {
365 sweep(&cases);363 sweep(&cases);
366 }364 }
367 365
368-/// 1920x1080 intra and long-GOP, progressive and MBAFF (opt-in, slow).366+/// 1920x1080 intra and long-GOP, progressive and MBAFF (slow).
369 #[test]367 #[test]
370 fn x264_hi422_hd() {368 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- }
375 sweep(&[369 sweep(&[
376 case("hd-i-cabac", "testsrc2", "1920x1080", 2, "keyint=1"),370 case("hd-i-cabac", "testsrc2", "1920x1080", 2, "keyint=1"),
377 case(371 case(
crates/ec-h264/tests/it/high422_jvt.rsmodified+0 -6
@@ -99,12 +99,6 @@ fn jvt_hi422_vectors_bit_exact() {
99 let mut exact = Vec::new();99 let mut exact = Vec::new();
100 for path in &list {100 for path in &list {
101 let name = path.file_stem().unwrap().to_string_lossy().to_string();101 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- }
108 let bytes = std::fs::read(path).unwrap();102 let bytes = std::fs::read(path).unwrap();
109 let (ours, format) = match decode_all(&bytes) {103 let (ours, format) = match decode_all(&bytes) {
110 Ok(v) => v,104 Ok(v) => v,
crates/ec-h264/tests/it/high444.rsmodified+1 -7
@@ -9,8 +9,6 @@
9 //! on the luma plane against ffmpeg's `gray` / `gray10le`; chroma must be 128,9 //! on the luma plane against ffmpeg's `gray` / `gray10le`; chroma must be 128,
10 //! or 512 at 10 bits). Separate colour planes cannot be written by x264; the10 //! or 512 at 10 bits). Separate colour planes cannot be written by x264; the
11 //! JVT vectors (`high444_jvt.rs`) cover them.11 //! JVT vectors (`high444_jvt.rs`) cover them.
12-//!
13-//! set `EC_H264_HI444_HD=1`.
14 12
15 use std::path::{Path, PathBuf};13 use std::path::{Path, PathBuf};
16 14
@@ -604,13 +602,9 @@ fn x264_monochrome_mbaff_and_lossless() {
604 sweep("gray MBAFF / lossless", &cases);602 sweep("gray MBAFF / lossless", &cases);
605 }603 }
606 604
607-/// 1280x720 (opt-in, slow).605+/// 1280x720 (slow).
608 #[test]606 #[test]
609 fn x264_hi444_hd() {607 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- }
614 let base = [608 let base = [
615 case("hd-i-cabac", "testsrc2", "1280x720", 2, "keyint=1"),609 case("hd-i-cabac", "testsrc2", "1280x720", 2, "keyint=1"),
616 case(610 case(
crates/ec-h264/tests/it/high444_jvt.rsmodified+0 -5
@@ -212,10 +212,6 @@ fn jvt_hi444_vectors_bit_exact() {
212 let mut summary = Vec::new();212 let mut summary = Vec::new();
213 for path in &list {213 for path in &list {
214 let name = path.file_stem().unwrap().to_string_lossy().to_string();214 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- }
219 let bytes = std::fs::read(path).unwrap();215 let bytes = std::fs::read(path).unwrap();
220 let (ours, format) = match decode_all(&bytes) {216 let (ours, format) = match decode_all(&bytes) {
221 Ok((f, fmt)) if !f.is_empty() => (f, fmt),217 Ok((f, fmt)) if !f.is_empty() => (f, fmt),
@@ -227,7 +223,6 @@ fn jvt_hi444_vectors_bit_exact() {
227 Err(e) if e.to_string().contains("FMO") => {223 Err(e) if e.to_string().contains("FMO") => {
228 // The Sejong Univ. streams use slice groups, which this224 // The Sejong Univ. streams use slice groups, which this
229 // decoder refuses by name (not part of this lane).225 // decoder refuses by name (not part of this lane).
230- eprintln!("SKIP {name}: {e}");
231 summary.push(format!("{name} fmo-refused"));226 summary.push(format!("{name} fmo-refused"));
232 continue;227 continue;
233 }228 }
crates/ec-h264/tests/it/mbaff_x264.rsmodified+1 -7
@@ -3,8 +3,6 @@
3 //! sources: CABAC and CAVLC, top and bottom field first, B-frames with3 //! sources: CABAC and CAVLC, top and bottom field first, B-frames with
4 //! spatial and temporal direct, weighted prediction, the 8x8 transform,4 //! spatial and temporal direct, weighted prediction, the 8x8 transform,
5 //! several slices, and High 10.5 //! several slices, and High 10.
6-//!
7-//! opt-in: set `EC_H264_MBAFF_HD=1` (the lane gate does).
8 6
9 use std::path::{Path, PathBuf};7 use std::path::{Path, PathBuf};
10 8
@@ -357,13 +355,9 @@ fn x264_mbaff_sd() {
357 ]);355 ]);
358 }356 }
359 357
360-/// 1920x1080: opt-in (`EC_H264_MBAFF_HD=1`).358+/// 1920x1080.
361 #[test]359 #[test]
362 fn x264_mbaff_hd() {360 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- }
367 sweep(&[361 sweep(&[
368 case(362 case(
369 "hd-cabac-tff",363 "hd-cabac-tff",
crates/ec-h265/tests/it/conformance_intra.rsmodified+1 -3
@@ -47,9 +47,7 @@ fn streams() -> Vec<PathBuf> {
47 }47 }
48 }48 }
49 }49 }
50- let Ok(dirs) = std::fs::read_dir(&root) else {50+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
51- return Vec::new();
52- };
53 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();51 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
54 dirs.sort();52 dirs.sort();
55 dirs.into_iter()53 dirs.into_iter()
crates/ec-h265/tests/it/conformance_rext.rsmodified+1 -3
@@ -46,9 +46,7 @@ fn streams() -> Vec<PathBuf> {
46 }46 }
47 }47 }
48 }48 }
49- let Ok(dirs) = std::fs::read_dir(&root) else {49+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
50- return Vec::new();
51- };
52 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();50 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
53 dirs.sort();51 dirs.sort();
54 dirs.into_iter()52 dirs.into_iter()
crates/ec-h265/tests/it/cu_syntax.rsmodified+1 -3
@@ -23,9 +23,7 @@ fn streams() -> Vec<PathBuf> {
23 }23 }
24 }24 }
25 }25 }
26- let Ok(dirs) = std::fs::read_dir(&root) else {26+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
27- return Vec::new();
28- };
29 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();27 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
30 dirs.sort();28 dirs.sort();
31 dirs.into_iter()29 dirs.into_iter()
crates/ec-h265/tests/it/dec_shell.rsmodified+1 -3
@@ -310,9 +310,7 @@ fn streams() -> Vec<PathBuf> {
310 }310 }
311 }311 }
312 }312 }
313- let Ok(dirs) = std::fs::read_dir(&root) else {313+ let dirs = std::fs::read_dir(&root).expect("fixture directory");
314- return Vec::new();
315- };
316 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();314 let mut dirs: Vec<PathBuf> = dirs.filter_map(|e| e.ok().map(|e| e.path())).collect();
317 dirs.sort();315 dirs.sort();
318 dirs.into_iter()316 dirs.into_iter()
crates/ec-h265/tests/it/real_library.rsmodified+0 -1
@@ -1,4 +1,3 @@
1-//!
2 //! Every file either decodes bit-exactly, is refused by name (a pixel format or1 //! Every file either decodes bit-exactly, is refused by name (a pixel format or
3 //! a bit depth outside 4:2:0 8/10-bit, or a decoder refusal that says2 //! a bit depth outside 4:2:0 8/10-bit, or a decoder refusal that says
4 //! "unsupported"), or fails. A refusal is reported, not counted as a failure.3 //! "unsupported"), or fails. A refusal is reported, not counted as a failure.