Skip to content

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

If update-desktop-database or update-mime-database are not installed, there are a few GAppInfo methods for modifying file associations which will print a g_warning() when called. Something like:

GLib-GIO-FATAL-WARNING: Failed to execute child process “update-desktop-database” (No such file or directory)

(Example: https://gitlab.gnome.org/zamaudio/glib/-/jobs/3190053)

This will cause the appinfo/associations test to fail, as warnings are fatal.

If that’s going to happen, skip the test. We can’t hard-depend on these tools as they are external to GLib and only needed for a few operations. Instead we have a soft runtime dependency on them; that should be reflected in the tests.

Signed-off-by: Philip Withnall philip@tecnocode.co.uk

Helps: #3148

Closes #3148

Merge request reports