mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 18:33:22 +00:00
9526363152
* 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, for apps/pdfcraft, apps/pdfcraft-cli, automation, cos, crypt, engine, render, sign and ui-egui. ui-egui's ui_group binary and the support modules move into tests/it/ too. Crates with a single test file keep it. The test executables go from 150 to 52, and every crate runs the same number of tests as before. ui-egui perf keeps its own binary (own process): its frame-time budgets would charge each measurement for the other tests running beside it. What the move needs: - include_str!/include_bytes! and #[path] paths gain one "../". - ui-egui: one GPU lock in tests/it/main.rs replaces the five per-file ones (content, document_links, editing, fill_sign, view), so one process creates one wgpu device at a time. The drop-line test in ui.rs and the screenshot blocks behind PDFCRAFT_*_SHOT(S) and CRAFT_UI_DOCKING_DIR, which render without holding it, take it too. - pdfcraft winit_wayland_scroll: the vendored winit source it compiles names crate::event, so that shim lives in main.rs. - parity evidence names the new paths. * Name the one-binary test paths in docs and comments - READMEs, docs, ATTRIBUTION and source comments name tests/it/<file>.rs. - The oracle README's example filters with --test it encryption::qpdf_agrees. - pdfcraft's GPU lock comment points at the UI tests' shared lock in crates/ui-egui/tests/it/main.rs.
43 lines
1.2 KiB
TOML
43 lines
1.2 KiB
TOML
[package]
|
|
name = "pdfcraft-cli"
|
|
description = "PdfCraft command-line tool: inspect, render and robustness-check PDFs"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[[bin]]
|
|
name = "pdfcraft-cli"
|
|
path = "src/main.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
pdfcraft-render = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
pdfcraft-engine = { workspace = true }
|
|
pdfcraft-audit = { workspace = true }
|
|
pdfcraft-cos = { workspace = true }
|
|
pdfcraft-preflight = { workspace = true }
|
|
pdfcraft-automation = { workspace = true }
|
|
pdfcraft-platform = { workspace = true }
|
|
base64 = "0.22"
|
|
|
|
[dev-dependencies]
|
|
# Decodes `render` output in tests/it/owner_password.rs; already a dependency of the engine.
|
|
png = "0.18"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
# `geteuid` for `ui`'s control-file owner check: safe, so no `unsafe` libc call here.
|
|
# Already in Cargo.lock through the GUI crates.
|
|
rustix = { version = "1", features = ["process"] }
|
|
|
|
[build-dependencies]
|
|
# VERSIONINFO for pdfcraft-cli.exe; build.rs only uses it when targeting Windows.
|
|
winresource = "0.1"
|
|
|
|
[features]
|
|
default = ["mcp"]
|
|
# The opt-in MCP server (`pdfcraft-cli mcp`). Build with --no-default-features to leave it out.
|
|
mcp = ["pdfcraft-automation/mcp"]
|