From 464d3e4332d71f2ba4b7522f6c5cd789a2322b15 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 23 Sep 2019 14:01:17 +0200 Subject: [PATCH] test: update coverage make target --- test/Makefile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/test/Makefile b/test/Makefile index 744aaef8d..1f1fa1f36 100644 --- a/test/Makefile +++ b/test/Makefile @@ -5,18 +5,18 @@ SUBDIRS = \ att_db \ avdtp \ avdtp_util \ - avrcp \ base64 \ ble_client \ btstack_link_key_db \ crypto \ des_iterator \ + embedded \ flash_tlv \ gatt_client \ + gatt_server \ hfp \ hid_parser \ linked_list \ - maths \ mesh \ obex \ ring_buffer \ @@ -25,13 +25,17 @@ SUBDIRS = \ security_manager \ tlv_posix \ +# not testing anything in source tree +# maths \ # test fails # map_test \ # not unit-tests +# avrcp \ # map_client \ # sbc \ +.PHONY: coverage subdirs: echo Building all tests @@ -54,8 +58,15 @@ test: $(MAKE) -C $$dir test; \ done -coverage: test - lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/usr/*" --exclude "*/3rd-party/tinydir/*" --exclude "*/platform/posix/*" --exclude "*/test/*" --output-file coverage.info +coverage: + # delete trace data + rm -f coverage.info + find . -name "*.gcda" -type f -delete + # collect all files + # lcov --capture --initial --directory . --output-file coverage.info + # run tests + make test + # collect traces + lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/3rd-party/tinydir/*" --exclude "*/platform/posix/*" --exclude "*/test/*" --output-file coverage.info + # generate html output genhtml coverage.info --branch-coverage --output-directory coverage-html - -