From 8b8147012ca1ef34d72049c27b4bee9ef0b419f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Wed, 17 May 2017 16:00:02 +0200 Subject: [PATCH] Add -DCOVERAGE_BUILD for 'make coverage' building * top/maint.mk: Add -DCOVERAGE_BUILD to $COVERAGE_CCOPTS. * tests/test-printf-posix2.c: Skip test if build with COVERAGE_BUILD. * tests/test-fprintf-posix2.c: Likewise. --- ChangeLog | 8 ++++++++ tests/test-fprintf-posix2.c | 5 +++++ tests/test-printf-posix2.c | 5 +++++ top/maint.mk | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 92ced6d93..b34773980 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2017-05-17 Tim Rühsen + + Add -DCOVERAGE_BUILD for 'make coverage' building + + * top/maint.mk: Add -DCOVERAGE_BUILD to $COVERAGE_CCOPTS. + * tests/test-printf-posix2.c: Skip test if build with COVERAGE_BUILD. + * tests/test-fprintf-posix2.c: Likewise. + 2017-05-17 Bruno Haible README: Don't ask people to read a TeXinfo file. diff --git a/tests/test-fprintf-posix2.c b/tests/test-fprintf-posix2.c index 4687b9365..e1ea0b7bd 100644 --- a/tests/test-fprintf-posix2.c +++ b/tests/test-fprintf-posix2.c @@ -36,6 +36,11 @@ main (int argc, char *argv[]) int arg; int ret; +#ifdef COVERAGE_BUILD + /* skip test due to possible crash when compiled with -coverage */ + return 77; +#endif + /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA diff --git a/tests/test-printf-posix2.c b/tests/test-printf-posix2.c index b6ad209c7..55b336ae3 100644 --- a/tests/test-printf-posix2.c +++ b/tests/test-printf-posix2.c @@ -36,6 +36,11 @@ main (int argc, char *argv[]) int arg; int ret; +#ifdef COVERAGE_BUILD + /* skip test due to possible crash when compiled with -coverage */ + return 77; +#endif + /* Some printf implementations allocate temporary space with malloc. */ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ #ifdef RLIMIT_DATA diff --git a/top/maint.mk b/top/maint.mk index 09a98bce8..6e1e70d79 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -1486,7 +1486,7 @@ init-coverage: $(MAKE) $(AM_MAKEFLAGS) clean lcov --directory . --zerocounters -COVERAGE_CCOPTS ?= "-g --coverage" +COVERAGE_CCOPTS ?= "-g --coverage -DCOVERAGE_BUILD" COVERAGE_OUT ?= doc/coverage build-coverage: -- 2.11.0