mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-23 22:16:16 +01:00
gio/tests: add unix-fd test to win32
The "/unix-fd/scm" test is quite Unix-specific, the next patch is going to add a portable test. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
5efb84f24a
commit
b8eb64b350
@ -115,6 +115,7 @@ gio_tests = {
|
||||
'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||
'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||
'tls-bindings' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||
'unix-fd' : {},
|
||||
'gdbus-address-get-session' : {
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
|
||||
'should_fail' : host_system == 'darwin',
|
||||
@ -194,7 +195,6 @@ if host_machine.system() != 'windows'
|
||||
'resolver-parsing' : {'dependencies' : [network_libs]},
|
||||
'socket-address' : {},
|
||||
'stream-rw_all' : {},
|
||||
'unix-fd' : {},
|
||||
'unix-mounts' : {},
|
||||
'unix-streams' : {},
|
||||
'g-file-info-filesystem-readonly' : {},
|
||||
|
@ -2,8 +2,11 @@
|
||||
#include <gio/gnetworking.h>
|
||||
#include <gio/gunixfdmessage.h>
|
||||
#include <gio/gunixsocketaddress.h>
|
||||
#include <string.h>
|
||||
#ifdef G_OS_UNIX
|
||||
#include <glib-unix.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
/* ensures that no FDs are left open at the end */
|
||||
static void
|
||||
@ -41,6 +44,7 @@ create_fd_list (gint *fd_list)
|
||||
static void
|
||||
test_scm (void)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
GError *err = NULL;
|
||||
GUnixFDMessage *message;
|
||||
GUnixFDMessage **mv;
|
||||
@ -228,6 +232,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
g_object_unref (list);
|
||||
|
||||
check_fd_list (fd_list);
|
||||
#else
|
||||
g_test_skip ("FD SCM support doesn’t exist on Windows");
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user