@@ -4,12 +4,11 @@ LCOV_EXCLUDE += $(CCAN_TEST_SRC) ccan/list/test/helper.c
CCAN_TEST := $(CCAN_TEST_SRC:%.c=%)
-
-.PHONY: $(CCAN_TEST:%=%-gcov-run) ccan-check
+.PHONY: ccan-check
ccan-check: $(CCAN_TEST:%=%-check)
-check: ccan-check $(CCAN_TEST:%=%-gcov-run)
+check: ccan-check
.PHONY: ccan-coverage
@@ -35,8 +35,7 @@ LCOV_EXCLUDE += $(CORE_TEST:%=%.c) core/test/stubs.c
LCOV_EXCLUDE += $(CORE_TEST_NOSTUB:%=%.c) /usr/include/*
.PHONY : core-check
-core-check: $(CORE_TEST:%=%-check) $(CORE_TEST:%=%-gcov-run)
-core-check: $(CORE_TEST_NOSTUB:%=%-check) $(CORE_TEST_NOSTUB:%=%-gcov-run)
+core-check: $(CORE_TEST:%=%-check) $(CORE_TEST_NOSTUB:%=%-check)
.PHONY : core-coverage
core-coverage: $(CORE_TEST:%=%-gcov-run)
@@ -4,7 +4,7 @@ IPMI_TEST := hw/ipmi/test/run-fru
LCOV_EXCLUDE += $(IPMI_TEST:%=%.c)
.PHONY : hw-ipmi-check hw-ipmi-coverage
-hw-ipmi-check: $(IPMI_TEST:%=%-check) $(IPMI_TEST:%=%-gcov-run)
+hw-ipmi-check: $(IPMI_TEST:%=%-check)
hw-ipmi-coverage: $(IPMI_TEST:%=%-gcov-run)
check: hw-ipmi-check
@@ -33,7 +33,7 @@ check_PROGRAMS = \
TEST_FLAGS = -D__TEST__ -MMD -MP
.PHONY: libflash-check libflash-coverage
-libflash-check: $(check_PROGRAMS:%=%-check) $(CORE_TEST:%=%-gcov-run)
+libflash-check: $(check_PROGRAMS:%=%-check)
libflash-coverage: $(check_PROGRAMS:%=%-gcov-run)
clean: libflash-test-clean
check: libflash-check
@@ -8,12 +8,10 @@ SECVAR_TEST = $(patsubst %.c, %, $(wildcard $(SECVAR_TEST_DIR)/secvar-test-*.c))
HOSTCFLAGS+=-I . -I include
.PHONY : secvar-check
-secvar-check: $(SECVAR_TEST:%=%-check) $(SECVAR_TEST:%=%-gcov-run)
-secvar-check: $(SECVAR_TEST_NOSTUB:%=%-check) $(SECVAR_TEST_NOSTUB:%=%-gcov-run)
+secvar-check: $(SECVAR_TEST:%=%-check) $(SECVAR_TEST_NOSTUB:%=%-check)
.PHONY : secvar-coverage
-secvar-coverage: $(SECVAR_TEST:%=%-gcov-run)
-secvar-coverage: $(SECVAR_TEST_NOSTUB:%=%-gcov-run)
+secvar-coverage: $(SECVAR_TEST:%=%-gcov-run) $(SECVAR_TEST_NOSTUB:%=%-gcov-run)
check: secvar-check
coverage: secvar-coverage
@@ -9,8 +9,8 @@ libstb/test/print-stb-container-q: libstb/print-container
$(call Q, TEST , $(VALGRIND) libstb/print-container -I libstb/test/t.container |diff -u libstb/test/t.container.out -, $< t.container)
.PHONY : libstb-check
-libstb-check: $(LIBSTB_TEST:%=%-check) $(LIBSTB_TEST:%=%-gcov-run) libstb/test/print-stb-container-check
-libstb-check: $(LIBSTB_TEST_NOSTUB:%=%-check) $(LIBSTB_TEST_NOSTUB:%=%-gcov-run)
+libstb-check: $(LIBSTB_TEST:%=%-check) libstb/test/print-stb-container-check
+libstb-check: $(LIBSTB_TEST_NOSTUB:%=%-check)
.PHONY : libstb-coverage
libstb-coverage: $(LIBSTB_TEST:%=%-gcov-run)
We only really use the gcov output when doing the coverage report as a part of the "docs" CI builds. It's useful for development to just run the unit tests so make sure the "check" and "coverage" targets are seperate. This also speeds up our CI builds since those jobs are already doing a seperate GCOV pass so building and running the GCOV binaries during the check pass is redundant. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- Tbh, we could probably drop the gcov builds outside the docs container. We don't do anything with the gcov output for most of the builds, but I guess it's useful to at least verify it builds. --- ccan/Makefile.check | 5 ++--- core/test/Makefile.check | 3 +-- hw/ipmi/test/Makefile.check | 2 +- libflash/test/Makefile.check | 2 +- libstb/secvar/test/Makefile.check | 6 ++---- libstb/test/Makefile.check | 4 ++-- 6 files changed, 9 insertions(+), 13 deletions(-)