Commit Graph
2 Commits
Author SHA1 Message Date
eliets2andeliets2 1f26293482 Save per-file batch log with step status and failure reasons (#6519)
* Save per-file batch log with step status and failure reasons

Users need an honest per-file record after a batch run instead of only opaque JSON, so a failing file and its reason are not lost.

Add a plain-text per-file log to the batch result and an optional CLI log path that writes one section per file with step status, output name and failure reason plus final counts, annotating step errors with the step name.

Test: batch_log_names_failed_file_step_and_reason failed before the change and passes after.

* Address review for pull request 6519

* Batch log: escape backslashes, wire the CLI log option

* Compare the escaped output path in the batch log test

* Address review for pull request 6519

* Repair review branch integration

* Format the files this pull request changes

* Repair review branch integration

* Repair review branch integration

* Keep dry-run output names clear of files that already exist

* Give the dry-run log test its own output folder

* Address review for pull request 6519

* Format the files this pull request changes

* Repair review branch integration

* Tighten the change after a final review

* Tighten the change after a final review

* Repair review branch integration

* Address review for pull request 6519

* Format the files this pull request changes

* Address review for pull request 6519

* Repair review branch integration

* Address review for pull request 6519

* Format the files this pull request changes

* Repair review branch integration

* Address review for pull request 6519

* Format the files this pull request changes

* Address remaining review requests

* Tighten the change after a final review

---------

Co-authored-by: eliets2 <[email protected]>
2026-12-03 15:39:04 +01:00
aiongg 9526363152 Build each crate's integration tests as one binary (#4087)
* 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.
2026-10-22 11:28:58 -04:00