diff options
author | Thomas Haller <thaller@redhat.com> | 2019-05-23 12:38:19 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-05-27 12:39:25 +0200 |
commit | f8096448664a75fa86b07b7ae98dceeb100c3d70 (patch) | |
tree | 12f2e888e6e8c774886d8a05aee49af461fd9b1b /dispatcher | |
parent | cdaedecaa752585b4844080aff91ad8bdba2a56c (diff) | |
download | NetworkManager-f8096448664a75fa86b07b7ae98dceeb100c3d70.tar.gz |
build: don't link dispatcher with generated nmdbus-dispatcher bindings
We don't need it anymore.
Still, for tests let gdbus-codegen run and generate the sources and
compile them. We want to keep "dispatcher/nm-dispatcher.xml" and ensure
that it is still valid.
Diffstat (limited to 'dispatcher')
-rw-r--r-- | dispatcher/meson.build | 2 | ||||
-rw-r--r-- | dispatcher/tests/meson.build | 2 | ||||
-rw-r--r-- | dispatcher/tests/test-dispatcher-envp.c | 15 |
3 files changed, 17 insertions, 2 deletions
diff --git a/dispatcher/meson.build b/dispatcher/meson.build index 7bd41935c5..da9ac7f292 100644 --- a/dispatcher/meson.build +++ b/dispatcher/meson.build @@ -44,7 +44,7 @@ libnm_dispatcher_core = static_library( sources = files('nm-dispatcher.c') -sources += gnome.gdbus_codegen( +nmdbus_dispatcher_sources = gnome.gdbus_codegen( 'nmdbus-dispatcher', name + '.xml', interface_prefix: 'org.freedesktop', diff --git a/dispatcher/tests/meson.build b/dispatcher/tests/meson.build index 3da3c3e912..10d1c6a93f 100644 --- a/dispatcher/tests/meson.build +++ b/dispatcher/tests/meson.build @@ -7,7 +7,7 @@ incs = [ exe = executable( test_unit, - test_unit + '.c', + [ test_unit + '.c' ] + [ nmdbus_dispatcher_sources ], include_directories: incs, dependencies: libnm_core_dep, c_args: [ diff --git a/dispatcher/tests/test-dispatcher-envp.c b/dispatcher/tests/test-dispatcher-envp.c index cdc3e6b25b..b1205c3235 100644 --- a/dispatcher/tests/test-dispatcher-envp.c +++ b/dispatcher/tests/test-dispatcher-envp.c @@ -28,6 +28,8 @@ #include "nm-utils/nm-test-utils.h" +#include "nmdbus-dispatcher.h" + #define TEST_DIR NM_BUILD_SRCDIR"/dispatcher/tests" /*****************************************************************************/ @@ -637,6 +639,17 @@ test_up_empty_vpn_iface (void) /*****************************************************************************/ +static void +test_gdbus_codegen (void) +{ + gs_unref_object NMDBusDispatcher *dbus_dispatcher = NULL; + + dbus_dispatcher = nmdbus_dispatcher_skeleton_new (); + g_assert (NMDBUS_IS_DISPATCHER_SKELETON (dbus_dispatcher)); +} + +/*****************************************************************************/ + NMTST_DEFINE (); int @@ -653,6 +666,8 @@ main (int argc, char **argv) g_test_add_func ("/dispatcher/up_empty_vpn_iface", test_up_empty_vpn_iface); + g_test_add_func ("/dispatcher/gdbus-codegen", test_gdbus_codegen); + return g_test_run (); } |