From 94978b327803bd0ba1b53c9afcfff2943dcc6cb3 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 18 Sep 2020 17:32:28 +0200 Subject: [PATCH] test/coverage: replace path prefix with 'btstack' --- test/Makefile | 6 +++++- test/auto-pts/coverage.sh | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index a9d6782e8..8e851b0e5 100644 --- a/test/Makefile +++ b/test/Makefile @@ -87,6 +87,8 @@ test-coverage-ble: subdirs $(MAKE) test-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 + # strip path prefix such that paths start with 'btstack' + sed -i.bak -e 's|/Users/mringwal/buildbot-worker/test-develop/build|btstack|' coverage-unit-ble.info test-coverage: subdirs # delete trace data @@ -95,10 +97,12 @@ test-coverage: subdirs $(MAKE) test # collect traces lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit.info + # strip path prefix such that paths start with 'btstack' + sed -i.bak -e 's|/Users/mringwal/buildbot-worker/test-develop/build|btstack|' coverage-unit.info coverage: test-coverage test-coverage-ble # download pts coverage and fix paths - curl https://bluekitchen-gmbh.com/btstack/develop/coverage-pts.info | sed -e 's|/Users/mringwal/buildbot-worker/auto-pts/btstack|/root/buildbot-worker/test-develop/build|' > coverage-pts.info + curl https://bluekitchen-gmbh.com/btstack/develop/coverage-pts.info > coverage-pts.info # combine unit[-ble] and pts lcov --rc lcov_branch_coverage=1 -a coverage-pts.info -a coverage-unit.info --output-file coverage.info diff --git a/test/auto-pts/coverage.sh b/test/auto-pts/coverage.sh index 853c19640..c6a212219 100755 --- a/test/auto-pts/coverage.sh +++ b/test/auto-pts/coverage.sh @@ -3,6 +3,9 @@ # collect traces from auto-pts run (exclude chipset/zephyr) lcov --capture --rc lcov_branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --exclude "*/chipset/*" --output-file coverage-pts.info +# strip path prefix such that paths start with 'btstack' +sed -i.bak -e 's|/Users/mringwal/buildbot-worker/auto-pts/||' coverage-pts.info + # optional: download unit tests, merge and filter results like in ../Makefile # generate html output