From b85c9759985e8d81f785bed0a30ea39c9a4144c6 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 16 Jan 2018 08:56:31 +0100 Subject: [PATCH] tests: re-add coverage tests --- Makefile | 8 ++------ tests/Makefile.inc | 5 +++++ tests/unit/Makefile.inc | 4 ---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index b04a283a1..d2cd9ff64 100644 --- a/Makefile +++ b/Makefile @@ -85,12 +85,8 @@ ifdef PROFILE endif ifdef COVERAGE - CFLAGS += -fprofile-arcs -ftest-coverage - LDFLAGS += --coverage - LDLIBS += -lgcov - - LIB_LDFLAGS += -coverage - LIB_LDLIBS += -gcov + CFLAGS += --coverage + LDLIBS += -lgcov VARIANTS += coverage endif diff --git a/tests/Makefile.inc b/tests/Makefile.inc index 400aeefbe..6f7c61178 100644 --- a/tests/Makefile.inc +++ b/tests/Makefile.inc @@ -21,6 +21,11 @@ ################################################################################### include tests/unit/Makefile.inc + +ifdef COVERAGE + include tests/unit/Makefile.gcov.inc +endif + include tests/integration/Makefile.inc tests: unit-tests integration-tests diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc index 045a03e7b..2bc53e1c4 100644 --- a/tests/unit/Makefile.inc +++ b/tests/unit/Makefile.inc @@ -40,10 +40,6 @@ $(BUILDDIR)/tests/unit/%.o: tests/unit/%.c | $$(dir $$@) $(BUILDDIR)/unit-tests: $(TEST_OBJS) $(LIB) $(CC) $(TEST_LDFLAGS) $^ $(TEST_LDLIBS) -o $@ -ifdef COVERAGE - include tests/unit/Makefile.gcov.inc -endif - # Tests are not installed install-tests: