gplugin/gplugin

Enable tests that use module-semantics.
feature/meson
2016-12-18, Elliott Sales de Andrade
7abc371f107d
Parents 4acfec6624be
Children 2b4f3226a2f6
Enable tests that use module-semantics.

That is, they don't expect to be linked to all symbols.
--- a/gplugin/tests/dynamic-type/meson.build Sun Dec 18 03:51:58 2016 -0500
+++ b/gplugin/tests/dynamic-type/meson.build Sun Dec 18 03:56:16 2016 -0500
@@ -3,8 +3,6 @@
name_prefix : '',
dependencies : [gplugin_dep, GLIB])
-shared_library('dynamic-type-user', 'dynamic-type-user.c',
+shared_module('dynamic-type-user', 'dynamic-type-user.c',
name_prefix : '',
- # FIXME: Only here because meson defaults to -Wl,--no-undefined.
- link_with : [dynamic_type_provider],
dependencies : [gplugin_dep, GLIB])
--- a/gplugin/tests/meson.build Sun Dec 18 03:51:58 2016 -0500
+++ b/gplugin/tests/meson.build Sun Dec 18 03:56:16 2016 -0500
@@ -9,6 +9,7 @@
subdir('load-on-query-fail')
subdir('versioned-dependencies')
subdir('bind-local')
+subdir('unresolved-symbol')
###############################################################################
# Tests
@@ -155,6 +156,18 @@
#add_dependencies(test-bind-local bind-local)
###############################################################################
+# Unresolved Symbol
+###############################################################################
+e = executable('test-unresolved-symbol', 'test-unresolved-symbol.c',
+ c_args : [
+ '-DPLUGIN_DIR="@0@/unresolved-symbol/"'.format(
+ meson.current_build_dir()),
+ ],
+ dependencies : [gplugin_dep, GLIB, GOBJECT])
+test('Unresolved Symbol', e)
+#add_dependencies(test-unresolved-symbol unresolved-symbol)
+
+###############################################################################
# GTester Stuff
###############################################################################
#set(GTESTER_TESTS "${TESTS}")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/tests/unresolved-symbol/meson.build Sun Dec 18 03:56:16 2016 -0500
@@ -0,0 +1,4 @@
+shared_module('unresolved-symbol', 'unresolved-symbol.c',
+ name_prefix : '',
+ link_args : '-Wl,--warn-unresolved-symbols',
+ dependencies : [gplugin_dep, GLIB])
--- a/gplugin/tests/unresolved-symbol/unresolved-symbol.c Sun Dec 18 03:51:58 2016 -0500
+++ b/gplugin/tests/unresolved-symbol/unresolved-symbol.c Sun Dec 18 03:56:16 2016 -0500
@@ -18,6 +18,8 @@
#include <gplugin.h>
#include <gplugin-native.h>
+void some_unresolved_symbol(void);
+
G_MODULE_EXPORT GPluginPluginInfo *
gplugin_query(GPLUGIN_UNUSED GError **error) {
some_unresolved_symbol();