diff mbox series

[12/15] test: Do gcov builds as a seperate pass

Message ID 20200612022452.371685-13-oohall@gmail.com
State Accepted
Headers show
Series [01/15] test/qemu: Update command line arguments | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (fe70fbb78d33abea788a3221bc409a7c50c019c3)

Commit Message

Oliver O'Halloran June 12, 2020, 2:24 a.m. UTC
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(-)
diff mbox series

Patch

diff --git a/ccan/Makefile.check b/ccan/Makefile.check
index a5967661881e..e9c23970fff6 100644
--- a/ccan/Makefile.check
+++ b/ccan/Makefile.check
@@ -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
 
diff --git a/core/test/Makefile.check b/core/test/Makefile.check
index 8e59ef00e7b6..7c347bea2a56 100644
--- a/core/test/Makefile.check
+++ b/core/test/Makefile.check
@@ -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)
diff --git a/hw/ipmi/test/Makefile.check b/hw/ipmi/test/Makefile.check
index c3d6359c411b..ceed1ed396b8 100644
--- a/hw/ipmi/test/Makefile.check
+++ b/hw/ipmi/test/Makefile.check
@@ -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
diff --git a/libflash/test/Makefile.check b/libflash/test/Makefile.check
index 1e55237193f0..4dbd7ee75203 100644
--- a/libflash/test/Makefile.check
+++ b/libflash/test/Makefile.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
diff --git a/libstb/secvar/test/Makefile.check b/libstb/secvar/test/Makefile.check
index b41eaf4831ba..bba1197e63b5 100644
--- a/libstb/secvar/test/Makefile.check
+++ b/libstb/secvar/test/Makefile.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
diff --git a/libstb/test/Makefile.check b/libstb/test/Makefile.check
index d4d7cb46c7a2..6911e0aebc75 100644
--- a/libstb/test/Makefile.check
+++ b/libstb/test/Makefile.check
@@ -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)