From aa3e3225a7354c190a0f145bff3aa771e03d7fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Apr 2023 15:57:17 +0200 Subject: [PATCH] appmonitor: Skip the test under OSX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit c0ca3f99 this test is strictly depending on GDesktopAppInfo that is not defined or available in macos, so skip the test as we do for windows. We could have done this at meson level too, but keeping it this way is probably a better reminder that this should be adapted for such scenario one day™ See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2753753 (cherry picked from commit d296e9455976f1bcf62a83750606befff72aa06e) --- gio/tests/appmonitor.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gio/tests/appmonitor.c b/gio/tests/appmonitor.c index c1d68b889..0123ea59c 100644 --- a/gio/tests/appmonitor.c +++ b/gio/tests/appmonitor.c @@ -22,7 +22,7 @@ #include #include -#ifdef G_OS_UNIX +#if defined (G_OS_UNIX) && !defined (__APPLE__) #include #endif @@ -49,7 +49,7 @@ teardown (Fixture *fixture, g_clear_pointer (&fixture->applications_dir, g_free); } -#ifdef G_OS_UNIX +#if defined (G_OS_UNIX) && !defined (__APPLE__) static gboolean create_app (gpointer data) { @@ -97,13 +97,13 @@ timeout_cb (gpointer user_data) return G_SOURCE_REMOVE; } -#endif /* G_OS_UNIX */ +#endif /* defined (G_OS_UNIX) && !defined (__APPLE__) */ static void test_app_monitor (Fixture *fixture, gconstpointer user_data) { -#ifdef G_OS_UNIX +#if defined (G_OS_UNIX) && !defined (__APPLE__) gchar *app_path; GAppInfoMonitor *monitor; GMainContext *context = NULL; /* use the global default main context */ @@ -162,9 +162,11 @@ test_app_monitor (Fixture *fixture, g_object_unref (monitor); g_free (app_path); -#else /* if !G_OS_UNIX */ +#elif defined (__APPLE__) + g_test_skip (".desktop monitor on macos"); +#else /* if !(defined (G_OS_UNIX) && !defined (__APPLE__)) */ g_test_skip (".desktop monitor on win32"); -#endif /* !G_OS_UNIX */ +#endif /* !(defined (G_OS_UNIX) && !defined (__APPLE__)) */ } int