From 9dbbd7d09d510810dfa330376ecd71a413089c6a Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 1 Dec 2020 12:17:40 +0100 Subject: [PATCH] test: run make coverage in subdirs --- test/Makefile | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/test/Makefile b/test/Makefile index 58f431b31..c9d4ccfff 100644 --- a/test/Makefile +++ b/test/Makefile @@ -82,20 +82,34 @@ clean: $(MAKE) -C $$dir clean; \ done -test: - echo Run all test +subdirs-test: + echo Run all tests with ASAN @set -e; \ for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir test; \ done -test-ble: - echo Run all BLE tests +subdirs-test-ble: + echo Run all BLE tests with ASAN @set -e; \ for dir in $(SUBDIRS_BLE); do \ $(MAKE) -C $$dir test; \ done +subdirs-coverage: + echo Run all tests for coverage + @set -e; \ + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir coverage; \ + done + +subdirs-coverage-ble: + echo Run all BLE tests for coverage + @set -e; \ + for dir in $(SUBDIRS_BLE); do \ + $(MAKE) -C $$dir coverage; \ + done + coverage-pts.info: # download pts coverage and fix paths @@ -110,7 +124,7 @@ coverage-unit.info: subdirs # delete trace data find . -name "*.gcda" -type f -delete # run tests - $(MAKE) test + $(MAKE) subdirs-coverage # collect traces lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit.info # demangle @@ -120,7 +134,7 @@ coverage-unit-ble.info: subdirs # delete trace data find . -name "*.gcda" -type f -delete # run tests - $(MAKE) test-ble + $(MAKE) subdirs-coverage-ble # collect traces lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit-ble.info # demangle