summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-06-21 23:14:38 -0400
committerAndrew Yourtchenko <ayourtch@gmail.com>2023-06-22 13:35:28 +0000
commit1c95e12b0dd2b4902a289328e8e54fde6eed0623 (patch)
treeda7dd11cd7fc638f1189238bf2180aa6ce3f987a /Makefile
parentfdf6fbe2e771d88beddb6ca8d8bbd39599beeb9c (diff)
tests docs: fix lcov code coverage report generation
- Updated/rebased version of https://gerrit.fd.io/r/c/vpp/+/34199 Type: test Change-Id: I43913ecfd11a4578bdb10c4be76253fe38d57976 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 34 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 88d42dfe433..2b781fbcdfc 100644
--- a/Makefile
+++ b/Makefile
@@ -65,7 +65,7 @@ endif
DEB_DEPENDS = curl build-essential autoconf automake ccache
DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-python
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
-DEB_DEPENDS += lcov chrpath autoconf libnuma-dev
+DEB_DEPENDS += gcovr lcov chrpath autoconf libnuma-dev
DEB_DEPENDS += python3-all python3-setuptools check
DEB_DEPENDS += libffi-dev python3-ply
DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml
@@ -426,7 +426,7 @@ rebuild-release: wipe-release build-release
export TEST_DIR ?= $(WS_ROOT)/test
define test
- $(if $(filter-out $(2),retest),make -C $(BR) PLATFORM=vpp TAG=$(1) vpp-install,)
+ $(if $(filter-out $(2),retest),make -C $(BR) PLATFORM=vpp TAG=$(1) CC=$(CC) vpp-install,)
$(eval libs:=lib lib64)
make -C test \
VPP_BUILD_DIR=$(BR)/build-$(1)-native/vpp \
@@ -449,10 +449,28 @@ test:
test-debug:
$(call test,vpp_debug,test)
-.PHONY: test-gcov
-test-gcov:
+.PHONY: test-cov
+test-cov:
+ $(eval CC=gcc)
+ $(eval TEST_GCOV=1)
+ $(call test,vpp_gcov,cov)
+
+.PHONY: test-cov-build
+test-cov-build:
+ $(eval CC=gcc)
+ $(eval TEST_GCOV=1)
$(call test,vpp_gcov,test)
+.PHONY: test-cov-prep
+test-cov-prep:
+ $(eval CC=gcc)
+ $(call test,vpp_gcov,cov-prep)
+
+.PHONY: test-cov-post
+test-cov-post:
+ $(eval CC=gcc)
+ $(call test,vpp_gcov,cov-post)
+
.PHONY: test-all
test-all:
$(eval EXTENDED_TESTS=1)
@@ -463,6 +481,13 @@ test-all-debug:
$(eval EXTENDED_TESTS=1)
$(call test,vpp_debug,test)
+.PHONY: test-all-cov
+test-all-cov:
+ $(eval CC=gcc)
+ $(eval TEST_GCOV=1)
+ $(eval EXTENDED_TESTS=1)
+ $(call test,vpp_gcov,test)
+
.PHONY: papi-wipe
papi-wipe: test-wipe-papi
$(call banner,"This command is deprecated. Please use 'test-wipe-papi'")
@@ -487,8 +512,10 @@ test-shell:
test-shell-debug:
$(call test,vpp_debug,shell)
-.PHONY: test-shell-gcov
-test-shell-gcov:
+.PHONY: test-shell-cov
+test-shell-cov:
+ $(eval CC=gcc)
+ $(eval TEST_GCOV=1)
$(call test,vpp_gcov,shell)
.PHONY: test-dep
@@ -505,13 +532,9 @@ test-wipe-doc:
@echo "make test-wipe-doc is DEPRECATED"
sleep 300
-.PHONY: test-cov
-test-cov:
- $(eval EXTENDED_TESTS=1)
- $(call test,vpp_gcov,cov)
-
.PHONY: test-wipe-cov
test-wipe-cov:
+ $(call make,$(PLATFORM)_gcov,$(addsuffix -wipe,$(TARGETS)))
@make -C test wipe-cov
.PHONY: test-wipe-all