From 96409597aa396fa717a575194fd10cc08d1c1ef2 Mon Sep 17 00:00:00 2001 From: Andrew Jeffery Date: Thu, 21 Feb 2019 16:58:04 +1030 Subject: Makefile: Paper over gard and pflash coverage issues `make coverage-report` gave the following error: (cd external/pflash; lcov -q -c -d . -o pflash.info --rc lcov_branch_coverage=1; sed -i -e 's%external/pflash/libflash%libflash%; s%external/pflash/ccan%ccan%' pflash.info) (cd external/gard; lcov -q -c -d . -o gard.info --rc lcov_branch_coverage=1; sed -i -e 's%external/gard/libflash%libflash%; s%external/gard/ccan%ccan%' gard.info) geninfo: WARNING: no .gcda files found in . - skipping! geninfo: WARNING: no .gcda files found in . - skipping! lcov -q -c -d . -d ccan/check_type/test/ -d ccan/str/test/ -d ccan/str/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/list/test/ -d ccan/build_assert/test/ -d ccan/short_types/test/ -d ccan/short_types/test/ -d ccan/array_size/test/ -d ccan/container_of/test/ -d ccan/endian/test/ -d libc/test/ -d libc/test/ -d libc/test/ -d libc/test/ -o skiboot.info --rc lcov_branch_coverage=1 lcov -q -r skiboot.info 'external/pflash/*' -o skiboot.info lcov -q -r skiboot.info 'external/gard/*' -o skiboot.info lcov -q -a skiboot.info -a external/pflash/pflash.info -o skiboot.info lcov: ERROR: no valid records found in tracefile external/pflash/pflash.info make: *** [/home/andrew/src/open-power/skiboot/Makefile.main:315: skiboot.info] Error 255 And similar again for the gard tool. We should really untangle the build strategy for tools in external/, but in the mean time paper over the problem of generating the lcov output at the top level by ensuring we have a means to generate the necessary gcda files for lcov to consume. Signed-off-by: Andrew Jeffery Signed-off-by: Stewart Smith --- external/gard/Makefile | 4 ++++ external/pflash/Makefile | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'external') diff --git a/external/gard/Makefile b/external/gard/Makefile index 2ccd1440..50589cf4 100644 --- a/external/gard/Makefile +++ b/external/gard/Makefile @@ -5,6 +5,10 @@ include ../../external/common/rules.mk all: links arch_links $(EXE) +.PHONY: coverage +coverage: CFLAGS += -fprofile-arcs -ftest-coverage +coverage: check + #Rebuild version.o so that the the version always matches #what the test suite will get from ./make_version.sh check: version.o all diff --git a/external/pflash/Makefile b/external/pflash/Makefile index 5395bdfa..243de6ee 100644 --- a/external/pflash/Makefile +++ b/external/pflash/Makefile @@ -4,6 +4,10 @@ include ../../external/common/rules.mk all: links arch_links $(EXE) +.PHONY: coverage +coverage: CFLAGS += -fprofile-arcs -ftest-coverage +coverage: check + #Rebuild version.o so that the the version always matches #what the test suite will get from ./make_version.sh check: version.o all -- cgit v1.2.1