Commit 6d8280ec authored by Simon McVittie's avatar Simon McVittie

Merge branch 'code-coverage' into 'master'

Adapt to API change in AX_CODE_COVERAGE version 28

Closes #249

See merge request !88

Reviewed-by: @pwithnall
parents fc205cb4 83be61aa
Pipeline #16109 passed with stage
in 7 minutes and 16 seconds
......@@ -2,6 +2,7 @@
/.ccache/
/Doxyfile
/aclocal.m4
/aminclude_static.am
/autom4te.cache
/build-aux/
/bus/tmpfiles.d/dbus.conf
......@@ -12,11 +13,11 @@
/config.log
/config.status
/configure
/dbus-1.*-coverage.info
/dbus-1.*-coverage.info.tmp
/dbus-1.*-coverage/
/dbus-1.*.tar.*
/dbus-1.*/
/lcov.html/
/lcov.info
/lcov.info.tmp
/libtool
/m4/libtool.m4
/m4/lt*.m4
......
......@@ -42,4 +42,4 @@ DISTCHECK_CONFIGURE_FLAGS = \
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@
include $(top_srcdir)/aminclude_static.am
......@@ -6,7 +6,7 @@ systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
systemdsysusersdir = $(prefix)/lib/sysusers.d
DBUS_BUS_LIBS = \
$(CODE_COVERAGE_LDFLAGS) \
$(CODE_COVERAGE_LIBS) \
$(EXPAT_LIBS) \
$(SELINUX_LIBS) \
$(APPARMOR_LIBS) \
......@@ -16,7 +16,7 @@ DBUS_BUS_LIBS = \
$(NULL)
DBUS_LAUNCHER_LIBS = \
$(CODE_COVERAGE_LDFLAGS) \
$(CODE_COVERAGE_LIBS) \
$(EXPAT_LIBS) \
$(THREAD_LIBS) \
$(NETWORK_libs) \
......@@ -239,4 +239,4 @@ systemduserunit_DATA = \
endif
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@
include $(top_srcdir)/aminclude_static.am
......@@ -282,7 +282,10 @@ else
SYMBOL_EXPORT_LDFLAGS=
endif
libdbus_1_la_LIBADD= $(LIBDBUS_LIBS)
libdbus_1_la_LIBADD = \
$(CODE_COVERAGE_LIBS) \
$(LIBDBUS_LIBS) \
$(NULL)
libdbus_1_la_LDFLAGS = \
$(AM_LDFLAGS) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
......@@ -290,7 +293,11 @@ libdbus_1_la_LDFLAGS = \
-no-undefined \
$(NULL)
libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) libdbus-1.la
libdbus_internal_la_LIBADD = \
$(CODE_COVERAGE_LIBS) \
$(LIBDBUS_LIBS) \
libdbus-1.la \
$(NULL)
if DBUS_WIN
AM_CXXFLAGS = \
......@@ -309,7 +316,7 @@ endif
noinst_PROGRAMS =
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@
include $(top_srcdir)/aminclude_static.am
clean-local:
$(AM_V_at)rm -fr ./.dbus-keyrings
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_ac_append_to_file.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AC_APPEND_TO_FILE([FILE],[DATA])
#
# DESCRIPTION
#
# Appends the specified data to the specified Autoconf is run. If you want
# to append to a file when configure is run use AX_APPEND_TO_FILE instead.
#
# LICENSE
#
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
AC_DEFUN([AX_AC_APPEND_TO_FILE],[
AC_REQUIRE([AX_FILE_ESCAPES])
m4_esyscmd(
AX_FILE_ESCAPES
[
printf "%s" "$2" >> "$1"
])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_ac_print_to_file.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AC_PRINT_TO_FILE([FILE],[DATA])
#
# DESCRIPTION
#
# Writes the specified data to the specified file when Autoconf is run. If
# you want to print to a file when configure is run use AX_PRINT_TO_FILE
# instead.
#
# LICENSE
#
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
AC_DEFUN([AX_AC_PRINT_TO_FILE],[
m4_esyscmd(
AC_REQUIRE([AX_FILE_ESCAPES])
[
printf "%s" "$2" > "$1"
])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_add_am_macro_static.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_ADD_AM_MACRO_STATIC([RULE])
#
# DESCRIPTION
#
# Adds the specified rule to $AMINCLUDE.
#
# LICENSE
#
# Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AC_DEFUN([AX_ADD_AM_MACRO_STATIC],[
AC_REQUIRE([AX_AM_MACROS_STATIC])
AX_AC_APPEND_TO_FILE(AMINCLUDE_STATIC,[$1])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_am_macros_static.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_AM_MACROS_STATIC
#
# DESCRIPTION
#
# Adds support for macros that create Automake rules. You must manually
# add the following line
#
# include $(top_srcdir)/aminclude_static.am
#
# to your Makefile.am files.
#
# LICENSE
#
# Copyright (c) 2009 Tom Howard <tomhoward@users.sf.net>
# Copyright (c) 2009 Allan Caffee <allan.caffee@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 11
AC_DEFUN([AMINCLUDE_STATIC],[aminclude_static.am])
AC_DEFUN([AX_AM_MACROS_STATIC],
[
AX_AC_PRINT_TO_FILE(AMINCLUDE_STATIC,[
# ]AMINCLUDE_STATIC[ generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on ]m4_esyscmd([LC_ALL=C date])[
])
])
This diff is collapsed.
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_file_escapes.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_FILE_ESCAPES
#
# DESCRIPTION
#
# Writes the specified data to the specified file.
#
# LICENSE
#
# Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 8
AC_DEFUN([AX_FILE_ESCAPES],[
AX_DOLLAR="\$"
AX_SRB="\\135"
AX_SLB="\\133"
AX_BS="\\\\"
AX_DQ="\""
])
......@@ -43,9 +43,9 @@ libdbus_testutils_la_SOURCES += \
endif
libdbus_testutils_la_LIBADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(top_builddir)/dbus/libdbus-internal.la \
$(CODE_COVERAGE_LDFLAGS) \
$(NULL)
TEST_EXTENSIONS = .sh
......@@ -142,6 +142,8 @@ test_segfault_SOURCES = \
disable-crash-handling.h \
test-segfault.c \
$(NULL)
# Deliberately not adding CODE_COVERAGE_LIBS here because we really
# don't care about coverage for the test program that segfaults!
test_server_oom_SOURCES = internals/server-oom.c
test_server_oom_LDADD = libdbus-testutils.la $(GLIB_LIBS)
......@@ -174,7 +176,10 @@ test_bus_launch_helper_oom_LDADD = \
$(NULL)
dbus_daemon_launch_helper_for_tests_SOURCES = bus/launch-helper-for-tests.c
dbus_daemon_launch_helper_for_tests_LDADD = $(top_builddir)/bus/liblaunch-helper-internal.la
dbus_daemon_launch_helper_for_tests_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/bus/liblaunch-helper-internal.la \
$(NULL)
test_bus_system_SOURCES = bus/system.c
test_bus_system_LDADD = \
......@@ -813,4 +818,4 @@ $(installable_test_meta_with_config): %_with_config.test: %$(EXEEXT) Makefile
) > $@.tmp && mv $@.tmp $@
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
@CODE_COVERAGE_RULES@
include $(top_srcdir)/aminclude_static.am
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(CODE_COVERAGE_CPPFLAGS) \
$(DBUS_STATIC_BUILD_CPPFLAGS) \
$(VALGRIND_CFLAGS) \
-DDBUS_COMPILATION \
......@@ -68,14 +69,38 @@ if DBUS_ENABLE_EMBEDDED_TESTS
## build even when not doing "make check"
noinst_PROGRAMS=test-pending-call-dispatch test-pending-call-timeout test-pending-call-disconnected test-threads-init test-ids test-shutdown test-privserver-client test-autolaunch
test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_pending_call_disconnected_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_ids_LDADD=$(top_builddir)/dbus/libdbus-1.la
test_pending_call_dispatch_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
test_pending_call_timeout_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
test_pending_call_disconnected_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
test_threads_init_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
test_ids_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
test_shutdown_LDADD=../libdbus-testutils.la
test_privserver_client_LDADD=../libdbus-testutils.la
test_autolaunch_LDADD=../libdbus-testutils.la
test_shutdown_LDADD = \
$(CODE_COVERAGE_LIBS) \
../libdbus-testutils.la \
$(NULL)
test_privserver_client_LDADD = \
$(CODE_COVERAGE_LIBS) \
../libdbus-testutils.la \
$(NULL)
test_autolaunch_LDADD = \
$(CODE_COVERAGE_LIBS) \
../libdbus-testutils.la \
$(NULL)
endif
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(CODE_COVERAGE_CPPFLAGS) \
$(DBUS_STATIC_BUILD_CPPFLAGS) \
$(DBUS_X_CFLAGS) \
-DDBUS_COMPILATION \
......@@ -64,6 +65,7 @@ dbus_launch_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(NULL)
dbus_launch_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(DBUS_X_LIBS) \
$(NULL)
......@@ -72,6 +74,7 @@ dbus_run_session_SOURCES = \
dbus-run-session.c
dbus_run_session_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-internal.la \
$(NULL)
......@@ -82,15 +85,18 @@ dbus_uuidgen_SOURCES= \
dbus-uuidgen.c
dbus_send_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
dbus_monitor_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NETWORK_libs) \
$(NULL)
dbus_uuidgen_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
......@@ -107,14 +113,20 @@ dbus_test_tool_SOURCES = \
test-tool.c \
test-tool.h \
$(NULL)
dbus_test_tool_LDADD = $(top_builddir)/dbus/libdbus-1.la
dbus_test_tool_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
dbus_update_activation_environment_SOURCES = \
dbus-update-activation-environment.c \
tool-common.c \
tool-common.h \
$(NULL)
dbus_update_activation_environment_LDADD = $(top_builddir)/dbus/libdbus-1.la
dbus_update_activation_environment_LDADD = \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/dbus/libdbus-1.la \
$(NULL)
if DBUS_WIN
SUFFIXES = .rc
......
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