mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 23:28:54 +02:00
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:
@@ -384,6 +384,21 @@ test_associations (void)
|
|||||||
gboolean result;
|
gboolean result;
|
||||||
GList *list;
|
GList *list;
|
||||||
gchar *cmdline;
|
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);
|
cmdline = g_strconcat (g_test_get_dir (G_TEST_BUILT), "/appinfo-test --option", NULL);
|
||||||
appinfo = g_app_info_create_from_commandline (cmdline,
|
appinfo = g_app_info_create_from_commandline (cmdline,
|
||||||
|
|||||||
@@ -330,8 +330,6 @@ if host_machine.system() != 'windows'
|
|||||||
'appinfo' : {
|
'appinfo' : {
|
||||||
'install' : false,
|
'install' : false,
|
||||||
'extra_programs' : ['appinfo-test'],
|
'extra_programs' : ['appinfo-test'],
|
||||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
|
|
||||||
'can_fail' : host_system == 'gnu',
|
|
||||||
},
|
},
|
||||||
'desktop-app-info' : {
|
'desktop-app-info' : {
|
||||||
'install' : false,
|
'install' : false,
|
||||||
|
|||||||
Reference in New Issue
Block a user