Conversation
3463656 to
228d1c0
Compare
laurmaedje
left a comment
There was a problem hiding this comment.
Looking very nice! I left a few comments. One general remark is that it would be nice if you could add brief doc comments to at least all structs and ideally also methods.
Regarding merge: I'd like to keep the commits in principle. However, I think in the way it's currently set up, not all intermediate commits pass the tests. (Most importantly because of the last "Disable hashed references for now" commit.) Do you think it would be feasible to rebase in a way that lets each commit pass in isolation? Otherwise, I'm also fine with squashing. Let me know what you prefer.
To get the fuzzer tests to pass, I guess we also need to update the nightly toolchain used for fuzzing? I'd need to find a good nightly and sync the nightly versions across here and the web app. Perhaps, it would be worthwhile to decouple the whole krilla update from this PR. So basically: Update nightly toolchain for tests -> Update krilla -> Test runner changes. I can take care of the first PR.
86c9f5f to
8a2c869
Compare
Done
The commits should all pass CI now
I've opened a separate PR to |
16af406 to
aa5e565
Compare
|
The test suite might be a little bit slower now that svg and pdf are also tested and due to #7365. |
b5ecbf5 to
bc3d0e5
Compare
|
This LGTM apart from one thing: The VS Code test helper extension has some issues now. This line needs adjustment with the parameters typst/tools/test-helper/src/extension.ts Line 127 in bc3d0e5 And the preview also does not work correctly for tests that are have both paged and html. The extension does some light parsing of the attributes which needs to be adjusted. |
- Specify paged, html, or pdftags for all tests
- Replace nopdfua attribute with pdfstandard - Update pdftags test references
|
I think that should fix it |
Continuing from #7239. This is the first step in adding support for PDF and SVG tests. These tests will only store a hash of the reference output to reduce the storage needed for tests. I think the PDFs generated should be fully deterministic, but maybe @LaurenzV knows more?
The plan is to add a test tool later on that can build the test suite at another git revision on test failure to compare the previous and current reference output. Then static HTML is generated that allows conveniently inspecting the changes/diffs. The tool will be usable both in PRs and locally.
This PR changes a few things in the test suite:
renderreferences to a sub directoryrenderwith thepagedattribute which always runsrender,pdf, andsvgoutput.nopdfuawithpdfstandardwhich also applies to thepdfoutputpaged,html, orpdftagson a test, there is no default target anymore.pdfoutput always runs both the standard and the PDF/UA-1 exportpdftagscan either be used in conjunction withpagedor alone. If used alone only a tag tree reference is stored.pdftagsare now generated from a finished PDF document usinghayro/Lang,Alt,ActualText, andEof marked content sequences/Contentsand/URIof link annotations.BBoxes are formatted a little more compact--stagesflag to only run specific which test targets/outputs--no-default-featuresCurrently I've disabled
pdfandsvgreferences since there currently is no easy way to get the previous reference output, if there is a hash mismatch.I had to update
krillabecause empty table cell headers were previously omitted from PDFs, and it now requires rust1.89.