aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-11-24 17:16:12 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-24 17:16:12 (GMT)
commit7feff0656751fb45cd4128d96a5d48d85b32cb4a (patch)
tree84bd514129de6be4b5a6a1a4aa90b6eeef874c4c /hostapd
parentd9c753b4f5670ce8bcfca137c1c7b63a4cb1be46 (diff)
downloadhostap-7feff0656751fb45cd4128d96a5d48d85b32cb4a.zip
hostap-7feff0656751fb45cd4128d96a5d48d85b32cb4a.tar.gz
hostap-7feff0656751fb45cd4128d96a5d48d85b32cb4a.tar.bz2
Add CONFIG_CODE_COVERAGE=y option for gcov
This can be used to measure code coverage from test scripts. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/hostapd/Makefile b/hostapd/Makefile
index b4704ba..ae96d35 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -105,6 +105,14 @@ OBJS += ../src/common/wpa_common.o
OBJS += ../src/eapol_auth/eapol_auth_sm.o
+ifdef CONFIG_CODE_COVERAGE
+CFLAGS += -O0 -fprofile-arcs -ftest-coverage
+LIBS += -lgcov
+LIBS_c += -lgcov
+LIBS_h += -lgcov
+LIBS_n += -lgcov
+endif
+
ifndef CONFIG_NO_DUMP_STATE
# define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
# a file (undefine it, if you want to save in binary size)
@@ -939,6 +947,6 @@ hlr_auc_gw: $(HOBJS)
clean:
$(MAKE) -C ../src clean
rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw
- rm -f *.d
+ rm -f *.d *.gcno *.gcda *.gcov
-include $(OBJS:%.o=%.d)