mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-24 09:57:08 -06:00
Build each crate's integration tests as one binary
Every tests/*.rs file is its own executable that links the whole crate graph. Move each crate's test files into tests/it/ as modules of one tests/it/main.rs; helper modules under tests/common move with them. These keep their own binary (own process): - engine panic_hunt: a process-wide panic hook counts every panic. - engine text_gamma: changes the process-wide text gamma. - engine smart_filter_stages, mask_cache_purge: assert on global caches. - codecs pnm_peak_memory: reads the process's peak RSS. - photocraft mac_menu_appkit: harness = false.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
//! The crate's integration tests, linked into one test binary.
|
||||
|
||||
mod compound_limits;
|
||||
mod real_files;
|
||||
@@ -0,0 +1,5 @@
|
||||
//! The crate's integration tests, linked into one test binary.
|
||||
|
||||
mod liquify_source_footprint;
|
||||
mod retouch_blur_exact;
|
||||
mod warp_clipped;
|
||||
@@ -0,0 +1,16 @@
|
||||
//! The crate's integration tests, linked into one test binary.
|
||||
|
||||
mod agent_tasks;
|
||||
mod agent_tasks_extended;
|
||||
mod agent_tasks_more;
|
||||
mod bridge;
|
||||
mod inactive_save;
|
||||
mod krita;
|
||||
mod layered_save_dirty;
|
||||
mod mcp;
|
||||
mod mcp_wire;
|
||||
mod missing_font_warnings;
|
||||
mod native_save_name;
|
||||
mod openraster;
|
||||
mod raw_defaults;
|
||||
mod smart_filter_authorization;
|
||||
@@ -0,0 +1,6 @@
|
||||
//! The crate's integration tests, linked into one test binary.
|
||||
|
||||
mod bench;
|
||||
mod cms;
|
||||
mod gpu_matrix_shaper;
|
||||
mod regen;
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Decode warnings: a file that holds more than was decoded (#523: animations, multi-page
|
||||
//! TIFF) or less than it should (#518: truncated JPEG) says so; complete single images don't.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Magic-number detection, extensions, and the capability table
|
||||
//! (including the symmetric read/write guarantee).
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! `fidelity_warnings` cases, and consistency with what `encode` does.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use FidelityWarning as W;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#![cfg(all(feature = "corpus", feature = "heif"))]
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
use std::sync::LazyLock;
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Decompression-bomb guards.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//! The crate's integration tests, linked into one test binary.
|
||||
|
||||
mod camera_raw;
|
||||
mod common;
|
||||
mod dds;
|
||||
mod dds_write;
|
||||
mod decode_warnings;
|
||||
mod deep_exr;
|
||||
mod detect_caps;
|
||||
mod dpx;
|
||||
mod exr_cryptomatte;
|
||||
mod exr_multipart;
|
||||
mod fidelity;
|
||||
mod gif_frames;
|
||||
mod heif;
|
||||
mod limits;
|
||||
mod malformed;
|
||||
mod metadata;
|
||||
mod orientation;
|
||||
mod pcx;
|
||||
mod png_jpeg;
|
||||
mod pnm_headers;
|
||||
mod resolution;
|
||||
mod roundtrip;
|
||||
mod source_settings;
|
||||
mod tga;
|
||||
mod tiff_bench;
|
||||
mod tiff_exif;
|
||||
mod tiff_lab;
|
||||
mod tiff_pages;
|
||||
mod tiff_photoshop;
|
||||
mod tiff_regressions;
|
||||
mod webp_frames;
|
||||
mod webp_lossy;
|
||||
mod xpm;
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Malformed input must produce errors, never panics or huge allocations.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
use proptest::prelude::*;
|
||||
@@ -1,6 +1,6 @@
|
||||
//! ICC / EXIF / XMP / DPI / text preservation, per format, per caps.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! EXIF / TIFF orientation (#285): files are opened upright, and every export
|
||||
//! writes Orientation = 1 so the upright pixels are never rotated twice.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
use proptest::prelude::{any, prop_assert, prop_assert_eq, proptest};
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Format-specific behaviour: Adam7 PNG, JPEG colour models, oracle
|
||||
//! cross-checks against the `image` crate, and the optional PngSuite corpus.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//! Lossless formats must reproduce the (planned) conversion of the input
|
||||
//! exactly; lossy formats must stay above a PSNR threshold.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Reading back the settings a lossy file was saved with: a JPEG's quality from its
|
||||
//! quantisation tables, a WebP's lossy or lossless encoding (and its quality).
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! cargo test --release -p photocraft-codecs --test tiff_bench -- --ignored --nocapture
|
||||
//! ```
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::tiffgen::*;
|
||||
use photocraft_codecs::*;
|
||||
use std::time::Instant;
|
||||
@@ -4,7 +4,7 @@
|
||||
//! offsets past the end, absurd sizes) that must give `Ok` or a clean `Err`, never a panic.
|
||||
//! Every file here is hand-built by `common::tiffgen`.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::Rng;
|
||||
use common::tiffgen::*;
|
||||
use photocraft_codecs::*;
|
||||
@@ -2,7 +2,7 @@
|
||||
//! `Metadata` as opaque bytes: written when present, read from either byte order and from
|
||||
//! BigTIFF, and never a panic or an allocation on malformed input.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
mod common;
|
||||
use crate::common;
|
||||
|
||||
use common::tiffgen::*;
|
||||
use photocraft_codecs::{Image, decode, exif_orientation, upright_exif};
|
||||
@@ -3,7 +3,7 @@
|
||||
//! smaller than lossless on photographic content; alpha and metadata travel in the container;
|
||||
//! odd sizes and the limits behave.
|
||||
|
||||
mod common;
|
||||
use crate::common;
|
||||
use common::*;
|
||||
use photocraft_codecs::*;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
//! Artboards recognized from current .af properties move with their children and undo together.
|
||||
#![allow(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
#[path = "../../io/tests/support/current_affinity.rs"]
|
||||
#[path = "../../../io/tests/support/current_affinity.rs"]
|
||||
mod fixture;
|
||||
|
||||
use fixture::{Marker, document};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user