Merge branch '3148-appinfo-skip-if-utils-unavailable' into 'main'

tests: Skip appinfo/associations test if update-*-database not installed

Closes #3148

See merge request GNOME/glib!3658
This commit is contained in:
Philip Withnall 2023-10-22 23:35:40 +00:00
commit 9a03cdbcad
2 changed files with 15 additions and 2 deletions

View File

@ -384,6 +384,21 @@ test_associations (void)
gboolean result;
GList *list;
gchar *cmdline;
gchar *update_desktop_database = NULL, *update_mime_database = NULL;
update_desktop_database = g_find_program_in_path ("update-desktop-database");
update_mime_database = g_find_program_in_path ("update-mime-database");
if (update_desktop_database == NULL || update_mime_database == NULL)
{
g_test_skip ("update-desktop-database and update-mime-database are needed to change file associations");
g_free (update_desktop_database);
g_free (update_mime_database);
return;
}
g_free (update_desktop_database);
g_free (update_mime_database);
cmdline = g_strconcat (g_test_get_dir (G_TEST_BUILT), "/appinfo-test --option", NULL);
appinfo = g_app_info_create_from_commandline (cmdline,

View File

@ -330,8 +330,6 @@ if host_machine.system() != 'windows'
'appinfo' : {
'install' : false,
'extra_programs' : ['appinfo-test'],
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
'can_fail' : host_system == 'gnu',
},
'desktop-app-info' : {
'install' : false,