mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
Merge branch 'fix-static-test-3' into 'master'
Fix test failures for static builds (Reworked again) Closes #1648 See merge request GNOME/glib!989
This commit is contained in:
commit
003b6dacbb
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glibconfig.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define MODULE_FILENAME_PREFIX ""
|
||||
@ -82,6 +83,13 @@ test_extension_point (void)
|
||||
static void
|
||||
test_module_scan_all (void)
|
||||
{
|
||||
#ifdef GLIB_STATIC_COMPILATION
|
||||
/* The plugin module is statically linked with a separate copy
|
||||
* of GLib so g_io_extension_point_implement won't work. */
|
||||
g_test_skip ("GIOExtensionPoint with dynamic modules isn't supported in static builds.");
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (g_test_subprocess ())
|
||||
{
|
||||
GIOExtensionPoint *ep;
|
||||
@ -104,6 +112,12 @@ test_module_scan_all (void)
|
||||
static void
|
||||
test_module_scan_all_with_scope (void)
|
||||
{
|
||||
#ifdef GLIB_STATIC_COMPILATION
|
||||
/* Disabled for the same reason as test_module_scan_all. */
|
||||
g_test_skip ("GIOExtensionPoint with dynamic modules isn't supported in static builds.");
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (g_test_subprocess ())
|
||||
{
|
||||
GIOExtensionPoint *ep;
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <gio/gio.h>
|
||||
#include <glibconfig.h>
|
||||
#include "gconstructor.h"
|
||||
#include "test_resources2.h"
|
||||
#include "digit_test_resources.h"
|
||||
@ -644,6 +645,13 @@ test_resource_module (void)
|
||||
GBytes *data;
|
||||
GError *error;
|
||||
|
||||
#ifdef GLIB_STATIC_COMPILATION
|
||||
/* The resource module is statically linked with a separate copy
|
||||
* of a GLib so g_static_resource_init won't work as expected. */
|
||||
g_test_skip ("Resource modules aren't supported in static builds.");
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (g_module_supported ())
|
||||
{
|
||||
module = g_io_module_new (g_test_get_filename (G_TEST_BUILT,
|
||||
|
@ -183,7 +183,7 @@ if get_option('default_library') != 'static'
|
||||
endif
|
||||
endif
|
||||
|
||||
if host_system == 'windows' and get_option('default_library') == 'static'
|
||||
if get_option('default_library') == 'static'
|
||||
glibconfig_conf.set('GLIB_STATIC_COMPILATION', '1')
|
||||
glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1')
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user