tests/cursor: Embed a copy of the Adwaita cursor theme
As a follow-up to 87cc6633a5, embed a partial copy of the Adwaita cursor theme and point to it with XCURSOR_PATH to make the test completely independent from the installed cursor themes. Indeed, adwaita-icon-theme changed ever so slightly in version 48 so the ref tests started failing when the new version was installed. This is a copy of adwaita-icon-theme 47, which is what was used to generate the ref images. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4252>
This commit is contained in:
parent
eeaff29264
commit
f31539984d
@ -672,6 +672,7 @@ main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
g_autoptr (MetaContext) context = NULL;
|
||||
g_autofree char *path = NULL;
|
||||
|
||||
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_TEST,
|
||||
(META_CONTEXT_TEST_FLAG_NO_X11 |
|
||||
@ -681,6 +682,9 @@ main (int argc,
|
||||
meta_context_test_set_background_color (META_CONTEXT_TEST (context),
|
||||
COGL_COLOR_INIT (255, 255, 255, 255));
|
||||
|
||||
path = g_test_build_filename (G_TEST_DIST, "tests", "xcursors", NULL);
|
||||
g_setenv ("XCURSOR_PATH", path, TRUE);
|
||||
|
||||
test_context = context;
|
||||
|
||||
init_tests ();
|
||||
|
@ -1091,6 +1091,7 @@ if have_installed_tests
|
||||
install_subdir('migration', install_dir: tests_datadir)
|
||||
install_subdir('ref-tests', install_dir: tests_datadir)
|
||||
install_subdir('icc-profiles', install_dir: tests_datadir)
|
||||
install_subdir('xcursors', install_dir: tests_datadir)
|
||||
|
||||
install_data('org.gnome.mutter.test.gschema.xml', install_dir: tests_datadir)
|
||||
|
||||
|
@ -127,7 +127,7 @@ on_pointer_enter (WaylandSurface *surface,
|
||||
"and actual scale %f",
|
||||
effective_theme_size, theme_size, scale);
|
||||
|
||||
cursor_theme = wl_cursor_theme_load ("Adwaita",
|
||||
cursor_theme = wl_cursor_theme_load (NULL,
|
||||
effective_theme_size,
|
||||
display->shm);
|
||||
cursor = wl_cursor_theme_get_cursor (cursor_theme, cursor_name);
|
||||
|
BIN
src/tests/xcursors/default/cursors/default
Normal file
BIN
src/tests/xcursors/default/cursors/default
Normal file
Binary file not shown.
BIN
src/tests/xcursors/default/cursors/move
Normal file
BIN
src/tests/xcursors/default/cursors/move
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user