I'm working on some tests and I'm using lcov In order to correctly manage the coverage of all tests, my makefile:
geninfo
When this is made for all tests, I want to generate the whole coverage by calling:
lccov --add-tracefile <name>.info -o global_coverage.info
However, it seems that I need to indicate all .info file by --add-tracefile <name>.info
Ex: if I've file1.info
and file2.info
, I need to call:
lccov --add-tracefile file1.info --add-tracefile file2.info -o global_coverage.info
I can retrieve the list of all .info file by
# Get all .info file for coverag
INFO_FILES = $(wildcard $(TEST_BUILD_DIR)/*.info)
Is there a generic way to call this lcov
tool by indicating all .info file ?
Thanks
You can use this:
# Get all .info file for coverag
INFO_FILES := $(wildcard $(TEST_BUILD_DIR)/*.info)
global_coverage.info: $(INFO_FILES)
lccov $(addprefix --add-tracefile ,$^) -o $@