Skip to content

Commit 9b9b31b

Browse files
committed
Ship code coverage autoconf macros in dist tarball
This will enable code coverage for releases as well (install autoconf-archive into the release tarball build environment for that), and avoids incompatibilities between the version installed on the target system and release build system. Provide a dummy fallback for the Alpine and CentOS CI containers. Fixes #91
1 parent f8929e4 commit 9b9b31b

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

autogen.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ else
2727
echo 'EXTRA_DIST =' > docs/gtk-doc.make
2828
fi
2929

30+
ax_coverage="$(aclocal --print)/ax_code_coverage.m4"
31+
if ! cp --verbose "$ax_coverage" m4; then
32+
echo "ax_code_coverage.m4 (from autoconf-archive) not available, using dummy"
33+
echo 'AC_DEFUN([AX_CODE_COVERAGE],[[CODE_COVERAGE_RULES=''] AC_SUBST([CODE_COVERAGE_RULES])])' > m4/ax_code_coverage.m4
34+
fi
35+
3036
if type lcov >/dev/null 2>&1; then
3137
args="$args --enable-code-coverage"
3238
else

configure.ac

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,7 @@ AC_CHECK_PROGS(VALAC, [valac])
8484
AM_PROG_VALAC([0.16.1])
8585
8686
# code coverage support
87-
AC_MSG_CHECKING(for GNOME code coverage support)
88-
m4_ifdef([AX_CODE_COVERAGE],
89-
[AC_MSG_RESULT(yes)
90-
AX_CODE_COVERAGE],
91-
[AC_MSG_RESULT(no)
92-
CODE_COVERAGE_RULES=''
93-
AC_SUBST([CODE_COVERAGE_RULES])
94-
enable_code_coverage="no"])
95-
87+
AX_CODE_COVERAGE
9688
CPPFLAGS="$CPPFLAGS $CODE_COVERAGE_CPPFLAGS"
9789
CFLAGS="$CFLAGS $CODE_COVERAGE_CFLAGS"
9890
LDFLAGS="$LDFLAGS $CODE_COVERAGE_LIBS"

tests/run-ubuntu-chroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [ -n "${PROPOSED:-}" ]; then
4949
fi
5050
apt-get update
5151
$UPGRADE
52-
apt-get install -y pkg-config dh-autoreconf valac libglib2.0-dev libudev-dev libgudev-1.0-dev python3-gi gobject-introspection libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-gudev-1.0 gtk-doc-tools udev xserver-xorg-video-dummy xserver-xorg-input-evdev xserver-xorg-input-synaptics xinput usbutils gphoto2 valgrind
52+
apt-get install -y pkg-config dh-autoreconf autoconf-archive valac libglib2.0-dev libudev-dev libgudev-1.0-dev python3-gi gobject-introspection libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-gudev-1.0 gtk-doc-tools udev xserver-xorg-video-dummy xserver-xorg-input-evdev xserver-xorg-input-synaptics xinput usbutils gphoto2 valgrind
5353
5454
# run build and tests as user
5555
chown -R buildd:buildd /build

0 commit comments

Comments
 (0)