mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 18:55:12 +01:00
Merge branch '3538-dbus-appinfo-hurd' into 'main'
tests: Skip unsupported dbus-appinfo test on GNU/Hurd for the moment See merge request GNOME/glib!4425
This commit is contained in:
commit
a5f68ba494
@ -532,6 +532,12 @@ test_portal_open_file (void)
|
||||
char *uri;
|
||||
GFakeDesktopPortalThread *thread = NULL;
|
||||
|
||||
if (!g_fake_desktop_portal_is_supported ())
|
||||
{
|
||||
g_test_skip ("fake-desktop-portal not currently supported on this platform");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Run a fake-desktop-portal */
|
||||
thread = g_fake_desktop_portal_thread_new (session_bus_get_address ());
|
||||
g_fake_desktop_portal_thread_run (thread);
|
||||
@ -567,6 +573,12 @@ test_portal_open_uri (void)
|
||||
const char *uri = "http://example.com";
|
||||
GFakeDesktopPortalThread *thread = NULL;
|
||||
|
||||
if (!g_fake_desktop_portal_is_supported ())
|
||||
{
|
||||
g_test_skip ("fake-desktop-portal not currently supported on this platform");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Run a fake-desktop-portal */
|
||||
thread = g_fake_desktop_portal_thread_new (session_bus_get_address ());
|
||||
g_fake_desktop_portal_thread_run (thread);
|
||||
@ -611,6 +623,12 @@ test_portal_open_file_async (void)
|
||||
char *uri;
|
||||
GFakeDesktopPortalThread *thread = NULL;
|
||||
|
||||
if (!g_fake_desktop_portal_is_supported ())
|
||||
{
|
||||
g_test_skip ("fake-desktop-portal not currently supported on this platform");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Run a fake-desktop-portal */
|
||||
thread = g_fake_desktop_portal_thread_new (session_bus_get_address ());
|
||||
g_fake_desktop_portal_thread_run (thread);
|
||||
@ -649,6 +667,12 @@ test_portal_open_uri_async (void)
|
||||
const char *uri = "http://example.com";
|
||||
GFakeDesktopPortalThread *thread = NULL;
|
||||
|
||||
if (!g_fake_desktop_portal_is_supported ())
|
||||
{
|
||||
g_test_skip ("fake-desktop-portal not currently supported on this platform");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Run a fake-desktop-portal */
|
||||
thread = g_fake_desktop_portal_thread_new (session_bus_get_address ());
|
||||
g_fake_desktop_portal_thread_run (thread);
|
||||
|
@ -494,3 +494,15 @@ g_fake_desktop_portal_thread_stop (GFakeDesktopPortalThread *self)
|
||||
g_cancellable_cancel (self->cancellable);
|
||||
g_thread_join (g_steal_pointer (&self->thread));
|
||||
}
|
||||
|
||||
/* Whether fake-desktop-portal is supported on this platform. This basically
|
||||
* means whether _g_fd_query_path() will work at runtime. */
|
||||
gboolean
|
||||
g_fake_desktop_portal_is_supported (void)
|
||||
{
|
||||
#ifdef __GNU__
|
||||
return FALSE;
|
||||
#else
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
@ -33,6 +33,8 @@ const gchar *g_fake_desktop_portal_thread_get_last_request_activation_token (GFa
|
||||
void g_fake_desktop_portal_thread_run (GFakeDesktopPortalThread *self);
|
||||
void g_fake_desktop_portal_thread_stop (GFakeDesktopPortalThread *self);
|
||||
|
||||
gboolean g_fake_desktop_portal_is_supported (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __FAKE_DESKTOP_PORTAL_H__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user