Fixed incomplete deletion of all images that have passed tests before upload #30188
+4
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR summary
This PR fixes a bug with #27882, which intended to delete all images that have passed tests before uploading the artifact. However, due to the specification of
-type f
in thefind
call, it inadvertently skips over images where the expected image is a symbolic link rather than an actual file. All of the baseline images in the repository are symbolically linked in the results folder (#10222), so #27882 actually deleted only those images where the expected image was dynamically generated.This PR also extends the cleanup to GIF files (of which there is exactly one test).
I've tested this modification in a different PR, so I know that it successfully reduces the size of the uploaded artifact by ~50 MB. A few images (total of 370 kB) manage to still escape the cleanup, but I think that's small enough to put up with:
empty.eps
andempty_eps.png
fromtest_backend_ps.py
, which seems to be because the comparison image isempty-expected.pdf
(PDF, not EPS), so the cleanup isn't smart enough to clean them uptest_backend_pgf.py
, which use a different approach for image comparisonsPR checklist