Commit 003b6dac authored by Philip Withnall's avatar Philip Withnall

Merge branch 'fix-static-test-3' into 'master'

Fix test failures for static builds (Reworked again)

Closes #1648

See merge request !989
parents 618d3e4a 2718245d
Pipeline #95436 passed with stages
in 18 minutes and 46 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment