mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 21:35:16 +00:00
test/coverage: allow to run coverage locallay
This commit is contained in:
parent
b17ed348b1
commit
f8e02f4b1d
@ -84,17 +84,14 @@ test-ble:
|
||||
$(MAKE) -C $$dir test; \
|
||||
done
|
||||
|
||||
test-coverage-ble: subdirs
|
||||
# delete trace data
|
||||
find . -name "*.gcda" -type f -delete
|
||||
# run tests
|
||||
$(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
|
||||
# demangle
|
||||
python3 coverage_demangle.py coverage-unit-ble.info
|
||||
|
||||
test-coverage: subdirs
|
||||
coverage-pts.info:
|
||||
# download pts coverage and fix paths
|
||||
export BTSTACK_ROOT=`realpath ..`
|
||||
curl https://bluekitchen-gmbh.com/btstack/develop/coverage-pts.info | sed "s|/Users/mringwal/buildbot-worker/auto-pts/btstack|${BTSTACK_ROOT}|" > coverage-pts.info
|
||||
|
||||
|
||||
coverage-unit.info: subdirs
|
||||
# delete trace data
|
||||
find . -name "*.gcda" -type f -delete
|
||||
# run tests
|
||||
@ -104,23 +101,43 @@ test-coverage: subdirs
|
||||
# demangle
|
||||
python3 coverage_demangle.py 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 's|buildbot-worker/auto-pts/btstack|buildbot-worker/test-develop/build|' > coverage-pts.info
|
||||
coverage-unit-ble.info: subdirs
|
||||
# delete trace data
|
||||
find . -name "*.gcda" -type f -delete
|
||||
# run tests
|
||||
$(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
|
||||
# demangle
|
||||
python3 coverage_demangle.py coverage-unit-ble.info
|
||||
|
||||
# combine unit[-ble] and pts
|
||||
lcov --rc lcov_branch_coverage=1 -a coverage-pts.info -a coverage-unit.info --output-file coverage.info
|
||||
|
||||
coverage-ble.info: coverage-pts.info coverage-unit-ble.info
|
||||
# combine unit-ble and pts
|
||||
lcov --rc lcov_branch_coverage=1 -a coverage-pts.info -a coverage-unit-ble.info --output-file coverage-ble.info
|
||||
|
||||
|
||||
coverage-bat.info: coverage-ble.info
|
||||
# create bat subset from ble subset
|
||||
./coverage_subset_bat.py coverage-ble.info coverage-bat.info
|
||||
./coverage_subset_bat.py coverage-unit-ble.info coverage-unit-bat.info
|
||||
|
||||
./coverage_subset_bat.py coverage-pts.info coverage-pts-bat.info
|
||||
|
||||
coverage.info: coverage-pts.info coverage-unit.info
|
||||
# combine unit-ble and pts
|
||||
lcov --rc lcov_branch_coverage=1 -a coverage-pts.info -a coverage-unit.info --output-file coverage.info
|
||||
|
||||
|
||||
coverage-all: coverage.info
|
||||
# generate html output
|
||||
genhtml coverage-unit.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-unit
|
||||
genhtml coverage-unit-bat.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-unit-bat
|
||||
genhtml coverage-bat.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-bat
|
||||
genhtml coverage.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage
|
||||
genhtml coverage-pts-bat.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-pts-bat
|
||||
genhtml coverage.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage
|
||||
|
||||
coverage-bat: coverage-bat.info
|
||||
# generate html output
|
||||
genhtml coverage-bat.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-bat
|
||||
|
||||
coverage-ble: coverage-ble.info
|
||||
# generate html output
|
||||
genhtml coverage-ble.info --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-ble
|
||||
|
||||
|
||||
coverage: coverage-all coverage-ble coverage-bat
|
||||
|
Loading…
x
Reference in New Issue
Block a user