2014-07-25 12:04:04 -04:00
|
|
|
SUBDIRS = config
|
|
|
|
|
|
2016-04-07 17:24:23 +02:00
|
|
|
@GNOME_CODE_COVERAGE_RULES@
|
|
|
|
|
|
2013-08-22 10:47:21 -04:00
|
|
|
AM_CPPFLAGS = \
|
2015-12-22 12:18:22 +01:00
|
|
|
-I$(top_srcdir)/shared \
|
|
|
|
|
-I$(top_builddir)/shared \
|
2014-05-19 13:44:02 -04:00
|
|
|
-I$(top_srcdir)/libnm-core \
|
|
|
|
|
-I$(top_builddir)/libnm-core \
|
2013-06-29 13:33:36 +02:00
|
|
|
-I$(top_srcdir)/src/platform \
|
2009-01-18 23:19:09 -05:00
|
|
|
-I$(top_srcdir)/src/dhcp-manager \
|
2014-09-08 16:11:51 -05:00
|
|
|
-I$(top_srcdir)/src/devices \
|
2009-01-22 19:38:53 -05:00
|
|
|
-I$(top_srcdir)/src \
|
2013-08-22 10:47:21 -04:00
|
|
|
-I$(top_builddir)/src \
|
2014-04-07 16:14:47 -04:00
|
|
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
2015-07-17 14:22:27 +02:00
|
|
|
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
|
2016-04-07 17:24:23 +02:00
|
|
|
$(GLIB_CFLAGS) \
|
|
|
|
|
$(CODE_COVERAGE_CFLAGS)
|
|
|
|
|
|
|
|
|
|
AM_LDFLAGS = $(CODE_COVERAGE_LDFLAGS)
|
2009-01-18 23:19:09 -05:00
|
|
|
|
2011-01-10 23:39:12 -06:00
|
|
|
noinst_PROGRAMS = \
|
2014-01-21 13:07:06 +01:00
|
|
|
test-general \
|
2014-02-14 12:54:36 +01:00
|
|
|
test-general-with-expect \
|
2013-08-15 12:44:27 -05:00
|
|
|
test-ip4-config \
|
2013-10-03 23:42:26 -05:00
|
|
|
test-ip6-config \
|
2015-01-06 13:41:29 +01:00
|
|
|
test-route-manager-linux \
|
|
|
|
|
test-route-manager-fake \
|
2013-11-19 22:28:36 -06:00
|
|
|
test-dcb \
|
2016-03-01 08:56:14 +01:00
|
|
|
test-systemd \
|
2014-09-08 16:11:51 -05:00
|
|
|
test-resolvconf-capture \
|
2015-10-03 19:44:27 +02:00
|
|
|
test-wired-defname \
|
|
|
|
|
test-utils
|
2010-03-02 14:44:02 -08:00
|
|
|
|
2013-08-01 14:04:35 -05:00
|
|
|
####### ip4 config test #######
|
|
|
|
|
|
|
|
|
|
test_ip4_config_SOURCES = \
|
|
|
|
|
test-ip4-config.c
|
|
|
|
|
|
|
|
|
|
test_ip4_config_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2013-08-15 12:44:27 -05:00
|
|
|
####### ip6 config test #######
|
|
|
|
|
|
|
|
|
|
test_ip6_config_SOURCES = \
|
|
|
|
|
test-ip6-config.c
|
|
|
|
|
|
|
|
|
|
test_ip6_config_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2015-01-06 13:41:29 +01:00
|
|
|
####### route manager test #######
|
|
|
|
|
|
|
|
|
|
test_route_manager_fake_CPPFLAGS = \
|
|
|
|
|
$(AM_CPPFLAGS) \
|
platform: extend NMIPConfigSource to preserve the rtm_protocol field
For addresses (NMPlatformIPAddress) the @addr_source field is ignored
on a platform level. That is, all addresses inside the platform cache
have this value set to NM_IP_CONFIG_SOURCE_KERNEL. Maybe, for that reason,
the source should not be a part of the NMPlatformIPAddress structure, but
it is convenient for users to piggy back the source inside the platform
address structure.
For routes, the source is stored in NMPlatformIPRoute's @rt_source
field. When adding a route to kernel, we set the @rtm_protocol of the
route depending on the source. However, we want to map different source
values to the same protocol value.
On the other hand, when kernel sends us a route that gets put inside
the cache, we must preserve the protocol value and must not map
different protocol values to the same source.
The reason is, that a user can add two routes that only differ by
@rtm_protocol. In that sense, the @rtm_protocol fields is part of the
unique ID of a kernel route, and thus different values must map to
different sources.
Fix this, by extending the range of NMIPConfigSource to contain
a range of protocol fields.
2016-04-11 17:35:29 +02:00
|
|
|
$(GUDEV_CFLAGS) \
|
2015-02-27 17:15:39 +01:00
|
|
|
-I$(top_srcdir)/src/platform/tests \
|
2015-01-06 13:41:29 +01:00
|
|
|
-DSETUP=nm_fake_platform_setup \
|
|
|
|
|
-DKERNEL_HACKS=0
|
|
|
|
|
|
|
|
|
|
test_route_manager_fake_SOURCES = \
|
2015-02-27 17:15:39 +01:00
|
|
|
$(top_srcdir)/src/platform/tests/test-common.c \
|
2015-01-06 13:41:29 +01:00
|
|
|
test-route-manager.c
|
|
|
|
|
|
|
|
|
|
test_route_manager_fake_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
|
|
|
|
test_route_manager_linux_SOURCES = \
|
2015-02-27 17:15:39 +01:00
|
|
|
$(top_srcdir)/src/platform/tests/test-common.c \
|
2015-01-06 13:41:29 +01:00
|
|
|
test-route-manager.c
|
|
|
|
|
|
|
|
|
|
test_route_manager_linux_CPPFLAGS = \
|
|
|
|
|
$(AM_CPPFLAGS) \
|
platform: extend NMIPConfigSource to preserve the rtm_protocol field
For addresses (NMPlatformIPAddress) the @addr_source field is ignored
on a platform level. That is, all addresses inside the platform cache
have this value set to NM_IP_CONFIG_SOURCE_KERNEL. Maybe, for that reason,
the source should not be a part of the NMPlatformIPAddress structure, but
it is convenient for users to piggy back the source inside the platform
address structure.
For routes, the source is stored in NMPlatformIPRoute's @rt_source
field. When adding a route to kernel, we set the @rtm_protocol of the
route depending on the source. However, we want to map different source
values to the same protocol value.
On the other hand, when kernel sends us a route that gets put inside
the cache, we must preserve the protocol value and must not map
different protocol values to the same source.
The reason is, that a user can add two routes that only differ by
@rtm_protocol. In that sense, the @rtm_protocol fields is part of the
unique ID of a kernel route, and thus different values must map to
different sources.
Fix this, by extending the range of NMIPConfigSource to contain
a range of protocol fields.
2016-04-11 17:35:29 +02:00
|
|
|
$(GUDEV_CFLAGS) \
|
2015-02-27 17:15:39 +01:00
|
|
|
-I$(top_srcdir)/src/platform/tests \
|
2015-01-06 13:41:29 +01:00
|
|
|
-DSETUP=nm_linux_platform_setup \
|
|
|
|
|
-DKERNEL_HACKS=1
|
|
|
|
|
|
|
|
|
|
test_route_manager_linux_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2013-10-03 23:42:26 -05:00
|
|
|
####### DCB test #######
|
|
|
|
|
|
|
|
|
|
test_dcb_SOURCES = \
|
|
|
|
|
test-dcb.c
|
|
|
|
|
|
|
|
|
|
test_dcb_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2013-11-19 22:28:36 -06:00
|
|
|
####### resolv.conf capture test #######
|
|
|
|
|
|
|
|
|
|
test_resolvconf_capture_SOURCES = \
|
|
|
|
|
test-resolvconf-capture.c
|
|
|
|
|
|
|
|
|
|
test_resolvconf_capture_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2014-01-21 13:07:06 +01:00
|
|
|
####### general test #######
|
|
|
|
|
|
|
|
|
|
test_general_SOURCES = \
|
|
|
|
|
test-general.c
|
|
|
|
|
|
|
|
|
|
test_general_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2014-02-14 12:54:36 +01:00
|
|
|
####### general-with-expect test #######
|
|
|
|
|
|
|
|
|
|
test_general_with_expect_SOURCES = \
|
|
|
|
|
test-general-with-expect.c
|
|
|
|
|
|
|
|
|
|
test_general_with_expect_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2014-09-08 16:11:51 -05:00
|
|
|
####### wired defname test #######
|
|
|
|
|
|
|
|
|
|
test_wired_defname_SOURCES = \
|
|
|
|
|
test-wired-defname.c
|
|
|
|
|
|
|
|
|
|
test_wired_defname_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2016-03-01 08:56:14 +01:00
|
|
|
####### systemd test #######
|
|
|
|
|
|
|
|
|
|
test_systemd_CFLAGS = \
|
|
|
|
|
"-I$(srcdir)/../" \
|
|
|
|
|
"-I$(srcdir)/../platform" \
|
2016-03-09 12:27:56 +01:00
|
|
|
"-I$(srcdir)/../systemd" \
|
2016-03-01 08:56:14 +01:00
|
|
|
"-I$(srcdir)/../systemd/src/systemd"
|
|
|
|
|
|
|
|
|
|
test_systemd_SOURCES = \
|
|
|
|
|
test-systemd.c
|
|
|
|
|
|
|
|
|
|
test_systemd_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager-base.la \
|
|
|
|
|
$(top_builddir)/src/libsystemd-nm.la
|
|
|
|
|
|
2015-10-03 19:44:27 +02:00
|
|
|
####### utils test #######
|
|
|
|
|
|
|
|
|
|
test_utils_SOURCES = \
|
|
|
|
|
test-utils.c
|
|
|
|
|
|
|
|
|
|
test_utils_DEPENDENCIES = \
|
|
|
|
|
$(top_srcdir)/src/NetworkManagerUtils.c
|
|
|
|
|
|
|
|
|
|
test_utils_CPPFLAGS = \
|
|
|
|
|
$(AM_CPPFLAGS) \
|
|
|
|
|
-DPREFIX=\"/nonexistent\" \
|
2016-04-25 21:18:06 +02:00
|
|
|
-DLOCALSTATEDIR=\"$(localstatedir)\" \
|
2015-10-03 19:44:27 +02:00
|
|
|
-DNMSTATEDIR=\"/nonsense\"
|
|
|
|
|
|
|
|
|
|
test_utils_LDADD = \
|
|
|
|
|
$(top_builddir)/src/libNetworkManager.la
|
|
|
|
|
|
2010-12-14 15:04:14 -06:00
|
|
|
####### secret agent interface test #######
|
|
|
|
|
|
|
|
|
|
EXTRA_DIST = test-secret-agent.py
|
|
|
|
|
|
|
|
|
|
###########################################
|
|
|
|
|
|
2015-02-04 11:58:52 +01:00
|
|
|
@VALGRIND_RULES@
|
2014-09-08 16:11:51 -05:00
|
|
|
TESTS = \
|
|
|
|
|
test-ip4-config \
|
|
|
|
|
test-ip6-config \
|
2015-01-06 13:41:29 +01:00
|
|
|
test-route-manager-fake \
|
|
|
|
|
test-route-manager-linux \
|
2014-09-08 16:11:51 -05:00
|
|
|
test-dcb \
|
|
|
|
|
test-resolvconf-capture \
|
|
|
|
|
test-general \
|
|
|
|
|
test-general-with-expect \
|
2016-03-01 08:56:14 +01:00
|
|
|
test-systemd \
|
2015-10-03 19:44:27 +02:00
|
|
|
test-wired-defname \
|
|
|
|
|
test-utils
|
2013-08-15 12:44:27 -05:00
|
|
|
|
2014-09-05 15:57:40 -05:00
|
|
|
|
|
|
|
|
if ENABLE_TESTS
|
|
|
|
|
|
|
|
|
|
check-local:
|
2015-11-12 17:28:51 +01:00
|
|
|
@for t in bond bridge ethernet infiniband ip_tunnel macvlan tun veth vlan vxlan; do \
|
2014-09-05 15:57:40 -05:00
|
|
|
# Ensure the device subclass factory registration constructors exist \
|
|
|
|
|
# which could inadvertently break if src/Makefile.am gets changed \
|
|
|
|
|
if ! LC_ALL=C nm $(top_builddir)/src/NetworkManager | LC_ALL=C grep -q "register_device_factory_internal_$$t" ; then \
|
|
|
|
|
echo "Testing device factory symbols... FAILED" ; \
|
|
|
|
|
exit 1 ; \
|
|
|
|
|
fi \
|
|
|
|
|
done
|
2014-10-06 16:42:29 +02:00
|
|
|
@echo "Testing device factory symbols... PASSED"
|
2014-09-05 15:57:40 -05:00
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|