Files
craft-libs/crates/ui/tests
dotCooCoo 23b10d78fb craft-ui: unit tests that render take turns with the wgpu renderer
Each egui_kittest wgpu renderer creates its own Vulkan instance and
device. When one test uses its device while a test on another thread
creates or destroys one, the Vulkan loader now and then crashes the test
binary with SIGSEGV. The previous commit serialized the four rendering
tests in tests/visual_regression.rs; the craft-ui unit test binary has
the same pattern in two tests:
combo::tests::the_button_and_menu_look_like_eguis and
tabs::dialog::tests::selected_tab_erases_a_baseline_centered_on_its_bottom_edge.

Both now take crate::gpu_test_lock() before building their harness and
hold it until the harness is dropped. The comment on the lock in
visual_regression.rs now names the loader race instead of concurrent
rendering alone.
2026-11-13 06:05:11 -08:00
..