Commit f0277c19 authored by Pavel Šimerda's avatar Pavel Šimerda

settings: add support for code coverage to the settings plugins

Use:

  ./autogen.sh --enable-code-coverage
  make
  make -C src/settings check-code-coverage
parent 4b863a4b
......@@ -18,6 +18,8 @@ SUBDIRS = \
examples \
vapi
@GNOME_CODE_COVERAGE_RULES@
EXTRA_DIST = \
CONTRIBUTING \
NetworkManager.pc.in \
......
......@@ -15,6 +15,8 @@ SUBDIRS= \
wifi \
settings
@GNOME_CODE_COVERAGE_RULES@
if WITH_WIMAX
SUBDIRS += wimax
endif
......
SUBDIRS = plugins . tests
@GNOME_CODE_COVERAGE_RULES@
INCLUDES = -I${top_srcdir} \
-I${top_builddir}/include \
-I${top_srcdir}/include \
......
SUBDIRS=keyfile example
@GNOME_CODE_COVERAGE_RULES@
if CONFIG_PLUGIN_IFCFG_RH
SUBDIRS+=ifcfg-rh
endif
......
SUBDIRS = . tests
@GNOME_CODE_COVERAGE_RULES@
nm-ifcfg-rh-glue.h: nm-ifcfg-rh.xml
$(AM_V_GEN) dbus-binding-tool --prefix=nm_ifcfg_rh --mode=glib-server --output=$@ $<
......
......@@ -2,41 +2,61 @@ if ENABLE_TESTS
SUBDIRS=network-scripts
INCLUDES = \
@GNOME_CODE_COVERAGE_RULES@
AM_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/src/wifi \
-I$(top_srcdir)/src/posix-signals \
-I$(srcdir)/../
AM_LDFLAGS = \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(CODE_COVERAGE_LDFLAGS)
AM_LDADD = \
$(top_builddir)/libnm-util/libnm-util.la \
$(top_builddir)/libnm-glib/libnm-glib.la
noinst_PROGRAMS = test-ifcfg-rh test-ifcfg-rh-utils
test_ifcfg_rh_SOURCES = \
test-ifcfg-rh.c
test-ifcfg-rh.c \
../errors.c \
../reader.c \
../shvar.c \
../utils.c \
../writer.c
test_ifcfg_rh_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
$(AM_CPPFLAGS) \
-DTEST_IFCFG_DIR=\"$(abs_srcdir)\" \
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/\"
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/\" \
-DSYSCONFDIR=\"nonexistent\" \
-DSBINDIR=\"nonexistent\"
test_ifcfg_rh_LDADD = \
$(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(AM_LDADD) \
$(top_builddir)/src/wifi/libwifi-utils.la \
$(builddir)/../libifcfg-rh-io.la \
$(top_builddir)/src/posix-signals/libnm-posix-signals.la \
$(LIBM)
$(DBUS_LIBS)
test_ifcfg_rh_utils_SOURCES = \
test-ifcfg-rh-utils.c
test_ifcfg_rh_utils_CPPFLAGS = \
$(GLIB_CFLAGS)
test-ifcfg-rh-utils.c \
../utils.c \
../shvar.c
test_ifcfg_rh_utils_LDADD = \
$(builddir)/../libifcfg-rh-io.la
$(AM_LDADD)
check-local: test-ifcfg-rh
$(abs_builddir)/test-ifcfg-rh-utils
......
SUBDIRS = . tests
@GNOME_CODE_COVERAGE_RULES@
INCLUDES = \
-I$(top_srcdir)/src/wifi \
-I$(top_srcdir)/src/settings \
......
if ENABLE_TESTS
@GNOME_CODE_COVERAGE_RULES@
INCLUDES=-I$(srcdir)/../ \
-I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/src/settings
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/src/wifi
noinst_PROGRAMS = check_ifnet
check_ifnet_SOURCES = test_all.c
check_ifnet_SOURCES = \
test_all.c \
../connection_parser.c \
../net_parser.c \
../net_utils.c \
../wpa_parser.c
check_ifnet_CPPFLAGS = \
$(CHECK_CFLAGS) \
$(GLIB_CFLAGS) \
-DTEST_WPA_SUPPLICANT_CONF='"$(srcdir)/wpa_supplicant.conf"'
$(CODE_COVERAGE_CFLAGS) \
-DTEST_WPA_SUPPLICANT_CONF='"$(srcdir)/wpa_supplicant.conf"' \
-DSYSCONFDIR=\"nonexistent\"
check_ifnet_LDFLAGS = \
$(CODE_COVERAGE_LDFLAGS)
check_ifnet_LDADD = $(top_builddir)/libnm-util/libnm-util.la \
$(builddir)/../lib-ifnet-io.la \
$(CHECK_LIBS) \
$(GLIB_LIBS) \
$(LIBM)
$(CHECK_LIBS) \
$(GLIB_LIBS) \
$(LIBM) \
$(top_builddir)/src/wifi/libwifi-utils.la
check-local: check_ifnet
$(abs_builddir)/check_ifnet $(abs_srcdir) $(abs_builddir)
......
SUBDIRS = . tests
@GNOME_CODE_COVERAGE_RULES@
INCLUDES = \
-I$(top_srcdir)/src/logging \
-I$(top_srcdir)/src/settings \
......
......@@ -6,12 +6,15 @@ INCLUDES = \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/src/settings \
-I$(srcdir)/../
noinst_PROGRAMS = test-ifupdown
test_ifupdown_SOURCES = \
test-ifupdown.c
test-ifupdown.c \
../interface_parser.c \
../parser.c
test_ifupdown_CPPFLAGS = \
$(GLIB_CFLAGS) \
......@@ -21,7 +24,6 @@ test_ifupdown_CPPFLAGS = \
test_ifupdown_LDADD = \
$(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(builddir)/../libifupdown-io.la \
$(DBUS_LIBS)
check-local: test-ifupdown
......
SUBDIRS = . tests
@GNOME_CODE_COVERAGE_RULES@
INCLUDES = \
-I$(top_srcdir)/src/settings \
-I$(top_srcdir)/include \
......
......@@ -2,30 +2,39 @@ if ENABLE_TESTS
SUBDIRS=keyfiles
@GNOME_CODE_COVERAGE_RULES@
INCLUDES = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(top_srcdir)/libnm-util \
-I$(top_builddir)/libnm-util \
-I$(top_srcdir)/libnm-glib \
-I$(top_srcdir)/src/settings \
-I$(srcdir)/../
noinst_PROGRAMS = test-keyfile
test_keyfile_SOURCES = \
test-keyfile.c
test-keyfile.c \
../reader.c \
../writer.c \
../errors.c \
../utils.c
test_keyfile_CPPFLAGS = \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
-DTEST_KEYFILES_DIR=\"$(abs_srcdir)/keyfiles\" \
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\"
-DTEST_SCRATCH_DIR=\"$(abs_builddir)/keyfiles\" \
-DNMCONFDIR=\"nonexistent\"
test_keyfile_LDADD = \
$(builddir)/../libkeyfile-io.la \
$(top_builddir)/libnm-glib/libnm-glib.la \
$(top_builddir)/libnm-util/libnm-util.la \
$(DBUS_LIBS)
$(DBUS_LIBS) \
$(CODE_COVERAGE_LDFLAGS)
check-local: test-keyfile
$(abs_builddir)/test-keyfile
......
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