2015-05-17 16:07:24 +00:00
|
|
|
|
|
|
|
# Makefile to build and run all tests
|
|
|
|
|
|
|
|
SUBDIRS = \
|
2015-07-02 08:46:45 +00:00
|
|
|
att_db \
|
2017-02-27 19:31:30 +00:00
|
|
|
avdtp \
|
2019-09-20 11:16:20 +00:00
|
|
|
avdtp_util \
|
2019-09-14 20:36:27 +00:00
|
|
|
base64 \
|
2015-05-17 16:07:24 +00:00
|
|
|
ble_client \
|
2017-02-27 19:31:30 +00:00
|
|
|
btstack_link_key_db \
|
2019-09-14 20:36:27 +00:00
|
|
|
crypto \
|
2015-05-17 16:07:24 +00:00
|
|
|
des_iterator \
|
2019-09-23 12:01:17 +00:00
|
|
|
embedded \
|
2019-09-18 11:13:05 +00:00
|
|
|
flash_tlv \
|
2015-05-17 16:07:24 +00:00
|
|
|
gatt_client \
|
2019-09-23 12:01:17 +00:00
|
|
|
gatt_server \
|
2015-08-20 15:06:54 +00:00
|
|
|
hfp \
|
2019-09-14 20:36:27 +00:00
|
|
|
hid_parser \
|
2015-05-17 16:07:24 +00:00
|
|
|
linked_list \
|
2019-10-22 14:42:03 +00:00
|
|
|
map_test \
|
2019-09-18 15:29:48 +00:00
|
|
|
mesh \
|
2019-09-14 20:36:27 +00:00
|
|
|
obex \
|
|
|
|
ring_buffer \
|
2019-09-18 15:42:10 +00:00
|
|
|
sdp \
|
2015-05-17 16:07:24 +00:00
|
|
|
sdp_client \
|
2015-07-16 21:28:09 +00:00
|
|
|
security_manager \
|
2019-09-14 20:36:27 +00:00
|
|
|
tlv_posix \
|
|
|
|
|
2019-09-23 12:01:17 +00:00
|
|
|
# not testing anything in source tree
|
|
|
|
# maths \
|
2019-09-14 20:36:27 +00:00
|
|
|
|
|
|
|
# test fails
|
|
|
|
|
|
|
|
# not unit-tests
|
2019-09-23 12:01:17 +00:00
|
|
|
# avrcp \
|
2019-09-14 20:36:27 +00:00
|
|
|
# map_client \
|
|
|
|
# sbc \
|
2019-09-23 12:01:17 +00:00
|
|
|
.PHONY: coverage
|
2015-07-03 09:01:27 +00:00
|
|
|
|
2015-05-17 16:07:24 +00:00
|
|
|
subdirs:
|
|
|
|
echo Building all tests
|
2015-10-12 08:59:06 +00:00
|
|
|
@set -e; \
|
2015-05-17 16:07:24 +00:00
|
|
|
for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -C $$dir; \
|
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
|
|
|
echo Clean all test
|
2015-10-12 08:59:06 +00:00
|
|
|
@set -e; \
|
2015-05-17 16:07:24 +00:00
|
|
|
for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -C $$dir clean; \
|
|
|
|
done
|
|
|
|
|
|
|
|
test:
|
|
|
|
echo Run all test
|
2015-10-12 08:59:06 +00:00
|
|
|
@set -e; \
|
2015-05-17 16:07:24 +00:00
|
|
|
for dir in $(SUBDIRS); do \
|
|
|
|
$(MAKE) -C $$dir test; \
|
|
|
|
done
|
|
|
|
|
2019-09-23 12:01:17 +00:00
|
|
|
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
|
2019-09-17 13:11:58 +00:00
|
|
|
genhtml coverage.info --branch-coverage --output-directory coverage-html
|
2019-09-23 14:15:22 +00:00
|
|
|
|
|
|
|
coverage-freertos-ble:
|
|
|
|
./coverage_filter.py src/mesh src/classic
|