From 8512145d7c65d56a35994ec1e3470ce2e2e49af7 Mon Sep 17 00:00:00 2001 From: adrianvillin Date: Thu, 11 Jan 2024 11:59:47 +0100 Subject: hs-test: added targets to makefiles to get coverage from HS tests Type: make Change-Id: Iae7998692890264dfeea98c165617d0efa024d42 Signed-off-by: adrianvillin --- test/Makefile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'test/Makefile') 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" -- cgit 1.2.3-korg