summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoradrianvillin <avillin@cisco.com>2024-01-11 11:59:47 +0100
committerDave Wallace <dwallacelf@gmail.com>2024-05-30 15:59:07 +0000
commit8512145d7c65d56a35994ec1e3470ce2e2e49af7 (patch)
tree1a10a280378a6e0541ef9426d0177a2074b453b0 /test
parent93974e281e7f99309af259c615f7068dee600114 (diff)
hs-test: added targets to makefiles to get coverage from HS tests
Type: make Change-Id: Iae7998692890264dfeea98c165617d0efa024d42 Signed-off-by: adrianvillin <avillin@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/Makefile b/test/Makefile
index 9b9cc178cf6..203a12e6e9b 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -354,12 +354,12 @@ cov-prep: test-dep
cov-post: wipe-cov $(BUILD_COV_DIR)
@lcov --capture \
--directory $(VPP_BUILD_DIR) \
- --output-file $(BUILD_COV_DIR)/coverage.info
+ --output-file $(BUILD_COV_DIR)/coverage$(HS_TEST).info
@test -z "$(EXTERN_COV_DIR)" || \
lcov --capture \
--directory $(EXTERN_COV_DIR) \
- --output-file $(BUILD_COV_DIR)/extern-coverage.info
- @lcov --remove $(BUILD_COV_DIR)/coverage.info \
+ --output-file $(BUILD_COV_DIR)/extern-coverage$(HS_TEST).info
+ @lcov --remove $(BUILD_COV_DIR)/coverage$(HS_TEST).info \
"/usr/include/*" "*/build-root/*" "/opt/*" "/usr/lib/*" \
"*_test.*" "*vat*" "*rdma*" "*/vpp-api/client/*" "*/plugins/af_packet/*" \
"*/plugins/af_xdp/*" "*/plugins/avf/*" "*/plugins/dma_intel/*" \
@@ -367,15 +367,17 @@ cov-post: wipe-cov $(BUILD_COV_DIR)
"*/plugins/perfmon/arm*" "*/plugins/perfmon/intel/*" "*/vlib/vmbus/*" \
"*/vnet/dev/*" "*/plugins/dev_ena/*" "*/plugins/builtinurl/*" "*/vnet/flow/*" \
"*/plugins/http_static/builtinurl/*" "*/plugins/dev_iavf/*" \
- -o $(BUILD_COV_DIR)/coverage-filtered.info
- @genhtml $(BUILD_COV_DIR)/coverage-filtered.info \
+ -o $(BUILD_COV_DIR)/coverage-filtered$(HS_TEST).info
+ @genhtml $(BUILD_COV_DIR)/coverage-filtered$(HS_TEST).info \
--output-directory $(BUILD_COV_DIR)/html
@test -z "$(EXTERN_COV_DIR)" || \
- genhtml $(BUILD_COV_DIR)/extern-coverage.info \
+ genhtml $(BUILD_COV_DIR)/extern-coverage$(HS_TEST).info \
--output-directory $(BUILD_COV_DIR)/extern-html
@echo
@echo "Build finished. Code coverage report is in $(BUILD_COV_DIR)/html/index.html"
@test -z "$(EXTERN_COV_DIR)" || echo "Code coverage report for out-of-tree objects is in $(BUILD_COV_DIR)/extern-html/index.html"
+ @mkdir -p $(BR)/test-coverage-merged
+ @cp -f $(BUILD_COV_DIR)/coverage-filtered$(HS_TEST).info $(BR)/test-coverage-merged
.PHONY: cov
cov:
@@ -434,6 +436,7 @@ help:
@echo " test-cov-prep - coverage phase #1 : prepare lcov"
@echo " test-cov-build - coverage phase #2 : build gcov image & run tests against it (use TEST=)"
@echo " test-cov-post - coverage phase #3 : generate lcov html report"
+ @echo " test-cov-both - generate and merge code coverage report for Python and Golang tests"
@echo " test-all - build and run functional and extended tests"
@echo " test-all-debug - build and run functional and extended tests (debug build)"
@echo " test-all-cov - generate code coverage report for functional and extended tests"