-
Notifications
You must be signed in to change notification settings - Fork 681
Expand file tree
/
Copy pathMakefile
More file actions
147 lines (126 loc) · 3.05 KB
/
Makefile
File metadata and controls
147 lines (126 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Makefile to build and run all tests
SUBDIRS = \
ad_parser \
att_db \
avdtp \
avdtp_util \
base64 \
ble_client \
btstack_link_key_db \
btstack_util \
btstack_memory \
classic-oob-pairing \
crypto \
des_iterator \
embedded \
flash_tlv \
gap \
gatt-service-client \
gatt_client \
gatt_server \
gatt_service_server \
hfp \
hid_parser \
l2cap-cbm \
l2cap-ecbm \
le_device_db_tlv \
linked_list \
mesh \
obex \
ring_buffer \
sdp \
sdp_client \
security_manager \
tlv_posix \
# not testing anything in source tree
# maths \
# no unit tests
# embedded \
# gatt_server \
# mixes classic with ble
# flash_tlv - contains btstack_linked_key_db tests
# hangs on buildbot (no output for 20 minutes -> abort)
# security_manager_sc
SUBDIRS_BLE = \
ad_parser \
att_db \
ble_client \
btstack_memory \
btstack_util \
crypto \
embedded \
gap \
gatt-service-client \
gatt_client \
gatt_server \
gatt_service_server \
hid_parser \
l2cap-cbm \
le_device_db_tlv \
linked_list \
ring_buffer \
security_manager \
# test fails
# not unit-tests
# avrcp \
# map_client \
# sbc \
# gatt_server \
.PHONY: coverage coverage-sm-sc.info
subdirs:
echo Building all tests
@set -e; \
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir; \
done
clean:
echo Clean all test
@set -e; \
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir clean; \
done
rm -f *.info
rm -rf coverage coverage-unit-ble
find . -name "*.gcda" -delete
find . -name "*.gcno" -delete
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-unit.info: subdirs-coverage
# run tests
$(MAKE) subdirs-coverage
# collect traces
lcov --capture --ignore-errors inconsistent --ignore-errors unused --rc branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit.info
coverage-unit-ble.info: subdirs-coverage-ble
# run tests
$(MAKE) subdirs-coverage-ble
# collect traces
lcov --capture --ignore-errors inconsistent --ignore-errors unused --rc branch_coverage=1 --directory . --exclude "/Applications/*" --exclude "/Library/*" --exclude "/usr/*" --exclude "*/test/*" --output-file coverage-unit-ble.info
coverage-all: coverage-unit.info
# generate html output
genhtml coverage-unit.info --ignore-errors inconsistent --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage
coverage-unit-ble: coverage-unit-ble.info
# generate html output
genhtml coverage-unit-ble.info --ignore-errors inconsistent --branch-coverage --demangle-cpp --config-file lcovrc --output-directory coverage-unit-ble
coverage: coverage-all coverage-unit-ble
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 with ASAN
@set -e; \
for dir in $(SUBDIRS_BLE); do \
$(MAKE) -C $$dir test; \
done