Add make test code coverage reporting using gcov
[vpp.git] / build-data / platforms / vpp_lite.mk
index 9375a7a..ef2ec44 100644 (file)
@@ -24,6 +24,9 @@ vpp_lite_native_tools = vppapigen
 
 vpp_lite_uses_dpdk = no
 
+# Uncoment to enable building unit tests
+#vpp_lite_enable_tests = yes
+
 vpp_lite_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \
        vpp-api gmod
 
@@ -41,3 +44,8 @@ vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE)
        -fstack-protector -fPIC -Werror
 vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
        -fstack-protector -fPIC -Werror
+
+vpp_lite_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
+       -fPIC -Werror -fprofile-arcs -ftest-coverage
+vpp_lite_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
+       -fPIC -Werror -coverage