diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2019-02-21 16:58:04 +1030 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-02-21 22:58:46 -0600 |
commit | 96409597aa396fa717a575194fd10cc08d1c1ef2 (patch) | |
tree | e2a55c003532a0da02e33e27c08a09a8b9e1c4e6 /external | |
parent | 5636d390b7f0ca9b9eec7afc471797aeb0b27e66 (diff) | |
download | skiboot-96409597aa396fa717a575194fd10cc08d1c1ef2.zip skiboot-96409597aa396fa717a575194fd10cc08d1c1ef2.tar.gz skiboot-96409597aa396fa717a575194fd10cc08d1c1ef2.tar.bz2 |
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 <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/gard/Makefile | 4 | ||||
-rw-r--r-- | external/pflash/Makefile | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/external/gard/Makefile b/external/gard/Makefile index 2ccd144..50589cf 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 5395bdf..243de6e 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 |