aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 31 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index edd632e42d5..1ab387e94d4 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ DEB_DEPENDS += debhelper dkms git libtool libapr1-dev dh-python
DEB_DEPENDS += libconfuse-dev git-review exuberant-ctags cscope pkg-config
DEB_DEPENDS += gcovr lcov chrpath autoconf libnuma-dev
DEB_DEPENDS += python3-all python3-setuptools check
-DEB_DEPENDS += libffi-dev python3-ply
+DEB_DEPENDS += libffi-dev python3-ply libunwind-dev
DEB_DEPENDS += cmake ninja-build python3-jsonschema python3-yaml
DEB_DEPENDS += python3-venv # ensurepip
DEB_DEPENDS += python3-dev python3-pip
@@ -86,6 +86,7 @@ DEB_DEPENDS += nasm
DEB_DEPENDS += iperf ethtool # for 'make test TEST=vm_vpp_interfaces'
DEB_DEPENDS += libpcap-dev
DEB_DEPENDS += tshark
+DEB_DEPENDS += jq # for extracting test summary from .json report (hs-test)
LIBFFI=libffi6 # works on all but 20.04 and debian-testing
@@ -244,6 +245,7 @@ help:
@echo " build - build debug binaries"
@echo " build-release - build release binaries"
@echo " build-coverity - build coverity artifacts"
+ @echo " build-vpp-gcov - build gcov vpp only"
@echo " rebuild - wipe and build debug binaries"
@echo " rebuild-release - wipe and build release binaries"
@echo " run - run debug binary"
@@ -251,6 +253,8 @@ help:
@echo " debug - run debug binary with debugger"
@echo " debug-release - run release binary with debugger"
@echo " test - build and run tests"
+ @echo " test-cov-hs - build and run host stack tests with coverage"
+ @echo " test-cov-both - build and run python and host stack tests, merge coverage data"
@echo " test-help - show help on test framework"
@echo " run-vat - run vpp-api-test tool"
@echo " pkg-deb - build DEB packages"
@@ -439,6 +443,10 @@ rebuild: wipe build
build-release: $(BR)/.deps.ok
$(call make,$(PLATFORM),$(addsuffix -install,$(TARGETS)))
+.PHONY: build-vpp-gcov
+build-vpp-gcov:
+ $(call test,vpp_gcov)
+
.PHONY: wipe-release
wipe-release: test-wipe $(BR)/.deps.ok
$(call make,$(PLATFORM),$(addsuffix -wipe,$(TARGETS)))
@@ -485,6 +493,20 @@ test-cov:
$(eval TEST_GCOV=1)
$(call test,vpp_gcov,cov)
+.PHONY: test-cov-hs
+test-cov-hs:
+ @make -C extras/hs-test build-cov
+ @make -C extras/hs-test test-cov
+
+.PHONY: test-cov-both
+test-cov-both:
+ @echo "Running Python, Golang tests and merging coverage reports."
+ find $(BR) -name '*.gcda' -delete
+ @make test-cov
+ find $(BR) -name '*.gcda' -delete
+ @make test-cov-hs
+ @make cov-merge
+
.PHONY: test-cov-build
test-cov-build:
$(eval CC=gcc)
@@ -501,6 +523,14 @@ test-cov-post:
$(eval CC=gcc)
$(call test,vpp_gcov,cov-post)
+.PHONY: cov-merge
+cov-merge:
+ @lcov --add-tracefile $(BR)/test-coverage-merged/coverage-filtered.info \
+ -a $(BR)/test-coverage-merged/coverage-filtered1.info -o $(BR)/test-coverage-merged/coverage-merged.info
+ @genhtml $(BR)/test-coverage-merged/coverage-merged.info \
+ --output-directory $(BR)/test-coverage-merged/html
+ @echo "Code coverage report is in $(BR)/test-coverage-merged/html/index.html"
+
.PHONY: test-all
test-all:
$(eval EXTENDED_TESTS=1)