Skip to content

Conversation

emilk
Copy link
Owner

@emilk emilk commented Sep 5, 2025

This adds a new mode, UPDATE_SNAPSHOTS=force, which will lower the threshold to zero, overwriting every image that is not exactly the same.

Most comparisons has a threshold because different GPUs render slightly differently. However, setting that threshold accurately can be hard.

Sometimes a test will pass locally, but fail on CI. In those cases you want to force an update of the failing test. You can use UPDATE_SNAPSHOTS=force for that.

And sometimes a small change should update all images, but the change is so tiny that it falls under the threshold. Still, you want to make a point of showing that these images have changes. You can use UPDATE_SNAPSHOTS=force for that.

@emilk emilk requested a review from lucasmerlin as a code owner September 5, 2025 14:28
@emilk emilk added feature New feature or request egui_kittest labels Sep 5, 2025
Copy link

github-actions bot commented Sep 5, 2025

Preview available at https://egui-pr-preview.github.io/pr/7508-emilkadd-updat-snapshots-force
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

Copy link
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@emilk emilk merged commit aedd43c into main Sep 5, 2025
47 checks passed
@emilk emilk deleted the emilk/add-updat-snapshots-force branch September 5, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui_kittest feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants