mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-31 18:00:06 +02:00
meson: Add tls-interaction test, and fix giomodule test
giomodule test needed symbol visibility pragmas added. This is needed on Windows anyway, so it's better to do it this way rather than disabling -fvisibility=hidden for the test modules.
This commit is contained in:
parent
e2da3cb599
commit
122f4c051d
@ -144,6 +144,12 @@ exe = executable('tls-certificate', 'tls-certificate.c', 'gtesttlsbackend.c',
|
||||
)
|
||||
test('tls-certificate', exe, env : test_env)
|
||||
|
||||
exe = executable('tls-interaction', 'tls-interaction.c', 'gtesttlsbackend.c',
|
||||
c_args : test_c_args,
|
||||
dependencies : [libglib_dep, libgmodule_dep, libgio_dep],
|
||||
)
|
||||
test('tls-interaction', exe, env : test_env)
|
||||
|
||||
exe = executable('socket-client', 'socket-client.c', 'gtlsconsoleinteraction.c',
|
||||
c_args : test_c_args,
|
||||
dependencies : [libglib_dep, libgmodule_dep, libgio_dep],
|
||||
@ -156,6 +162,8 @@ exe = executable('socket-client', 'socket-client.c', 'gtlsconsoleinteraction.c',
|
||||
#)
|
||||
#test('gdbus-daemon', exe, env : test_env)
|
||||
|
||||
# FIXME: Add resources test
|
||||
|
||||
foo = '''
|
||||
c_args_atomic = [ ]
|
||||
if cc.get_id() == 'gcc'
|
||||
|
16
gio/tests/modules/symbol-visibility.h
Normal file
16
gio/tests/modules/symbol-visibility.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef GLIB_TEST_SYMBOL_VISIBILITY
|
||||
#define GLIB_TEST_SYMBOL_VISIBILITY
|
||||
|
||||
/* This is the same check that's done in configure to create config.h */
|
||||
#ifdef _WIN32
|
||||
# ifdef _MSC_VER
|
||||
# define GLIB_TEST_EXPORT_SYMBOL __declspec(dllexport) extern
|
||||
# else
|
||||
# define GLIB_TEST_EXPORT_SYMBOL __attribute__((visibility("default"))) __declspec(dllexport) extern
|
||||
# endif
|
||||
/* Matches GCC and Clang */
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
# define GLIB_TEST_EXPORT_SYMBOL __attribute__((visibility("default"))) extern
|
||||
#endif
|
||||
|
||||
#endif /* GLIB_TEST_SYMBOL_VISIBILITY */
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "symbol-visibility.h"
|
||||
|
||||
typedef struct _TestA {
|
||||
GObject parent;
|
||||
} TestA;
|
||||
@ -42,7 +44,7 @@ test_a_init (TestA *self)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
GLIB_TEST_EXPORT_SYMBOL void
|
||||
g_io_module_load (GIOModule *module)
|
||||
{
|
||||
g_io_extension_point_implement ("test-extension-point",
|
||||
@ -51,7 +53,7 @@ g_io_module_load (GIOModule *module)
|
||||
30);
|
||||
}
|
||||
|
||||
void
|
||||
GLIB_TEST_EXPORT_SYMBOL void
|
||||
g_io_module_unload (GIOModule *module)
|
||||
{
|
||||
}
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "symbol-visibility.h"
|
||||
|
||||
typedef struct _TestB {
|
||||
GObject parent;
|
||||
} TestB;
|
||||
@ -42,7 +44,7 @@ test_b_init (TestB *self)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
GLIB_TEST_EXPORT_SYMBOL void
|
||||
g_io_module_load (GIOModule *module)
|
||||
{
|
||||
g_io_extension_point_implement ("test-extension-point",
|
||||
@ -51,7 +53,7 @@ g_io_module_load (GIOModule *module)
|
||||
40);
|
||||
}
|
||||
|
||||
void
|
||||
GLIB_TEST_EXPORT_SYMBOL void
|
||||
g_io_module_unload (GIOModule *module)
|
||||
{
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user