xref: /btstack/test/Makefile (revision 3c4cc6427fe05577c00b7d2593f58c7abcf9eab7)
1
2# Makefile to build and run all tests
3
4SUBDIRS =  \
5	att_db \
6	avdtp \
7	avdtp_util \
8	avrcp \
9	base64 \
10	ble_client \
11	btstack_link_key_db \
12	crypto \
13	des_iterator \
14	flash_tlv \
15	gatt_client \
16	hfp \
17	hid_parser \
18	linked_list \
19	maths \
20	mesh \
21	obex \
22	ring_buffer \
23	sdp \
24	sdp_client \
25	security_manager \
26	tlv_posix \
27
28
29# test fails
30# map_test \
31
32# not unit-tests
33# map_client \
34# sbc \
35
36subdirs:
37	echo Building all tests
38	@set -e; \
39	for dir in $(SUBDIRS); do \
40	  $(MAKE) -C $$dir; \
41	done
42
43clean:
44	echo Clean all test
45	@set -e; \
46	for dir in $(SUBDIRS); do \
47	  $(MAKE) -C $$dir clean; \
48	done
49
50test:
51	echo Run all test
52	@set -e; \
53	for dir in $(SUBDIRS); do \
54	  $(MAKE) -C $$dir test; \
55	done
56
57coverage: test
58	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
59	genhtml coverage.info --branch-coverage --output-directory coverage-html
60
61
62