diff options
author | Thomas Haller <thaller@redhat.com> | 2015-12-20 16:43:01 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-12-24 11:42:36 +0100 |
commit | 70713ee19770b3a0eac663bbc545be44d348ee0c (patch) | |
tree | 0b52a4aa8ddab2712c8f3126c2ac95e8f45183fe /libnm | |
parent | 45951bca506dbbcce2d495257b18da3c630b85ac (diff) | |
download | NetworkManager-70713ee19770b3a0eac663bbc545be44d348ee0c.tar.gz |
libnm/tests: unify common test code for libnm and libnm-glib
Unify the common test code to drive the D-Bus stub service
test-networkmanager-service.py. They will be merged in the next
commit.
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/tests/Makefile.am | 2 | ||||
-rw-r--r-- | libnm/tests/common.c | 4 | ||||
-rw-r--r-- | libnm/tests/common.h | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/libnm/tests/Makefile.am b/libnm/tests/Makefile.am index 0acbae8fe3..0c3bfda0cf 100644 --- a/libnm/tests/Makefile.am +++ b/libnm/tests/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -I$(top_builddir)/libnm \ -I$(top_srcdir)/libnm-core \ -I$(top_builddir)/libnm-core \ - -DNETWORKMANAGER_COMPILATION \ + -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ -DTEST_NM_SERVICE=\"$(abs_top_srcdir)/tools/test-networkmanager-service.py\" \ $(GLIB_CFLAGS) diff --git a/libnm/tests/common.c b/libnm/tests/common.c index 5b3f74eb27..9b71afb391 100644 --- a/libnm/tests/common.c +++ b/libnm/tests/common.c @@ -120,6 +120,8 @@ nm_test_service_cleanup (NMTestServiceInfo *info) g_free (info); } +#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB) + typedef struct { GMainLoop *loop; const char *ifname; @@ -232,3 +234,5 @@ nm_test_service_add_wired_device (NMTestServiceInfo *sinfo, NMClient *client, { return add_device_common (sinfo, client, "AddWiredDevice", ifname, hwaddr, subchannels); } + +#endif /* NM_NETWORKMANAGER_COMPILATION_LIB */ diff --git a/libnm/tests/common.h b/libnm/tests/common.h index 501ea16c4e..7ac61bb392 100644 --- a/libnm/tests/common.h +++ b/libnm/tests/common.h @@ -32,6 +32,8 @@ typedef struct { NMTestServiceInfo *nm_test_service_init (void); void nm_test_service_cleanup (NMTestServiceInfo *info); +#if ((NETWORKMANAGER_COMPILATION) == NM_NETWORKMANAGER_COMPILATION_LIB) + NMDevice *nm_test_service_add_device (NMTestServiceInfo *info, NMClient *client, const char *method, @@ -43,3 +45,5 @@ NMDevice * nm_test_service_add_wired_device (NMTestServiceInfo *sinfo, const char *hwaddr, const char **subchannels); +#endif /* NM_NETWORKMANAGER_COMPILATION_LIB */ + |