aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-05-11 06:55:32 +0200
committerKlement Sekera <ksekera@cisco.com>2017-05-11 06:55:32 +0200
commitcd6cb986ed35db7e8bd2d702b595f2de065dc80f (patch)
treeb1186da9cd6d45d561e989b43a17fd8eb5730832
parent460ba3d85951a42551864f0240335914a62639be (diff)
make test: support coverage for out-of-tree plugins
Change-Id: Ibd7828b1e1c699630ff450122d8aa317b1c9da26 Signed-off-by: Klement Sekera <ksekera@cisco.com>
-rw-r--r--test/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
index da45fb83..d0d7d098 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -111,6 +111,7 @@ shell: verify-python-path $(PAPI_INSTALL_DONE)
echo VPP_TEST_INSTALL_PATH=$(VPP_TEST_INSTALL_PATH);\
echo EXTERN_TESTS=$(EXTERN_TESTS);\
echo EXTERN_PLUGINS=$(EXTERN_PLUGINS);\
+ echo EXTERN_COV_DIR=$(EXTERN_COV_DIR);\
echo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH);\
echo '***';\
exec </dev/tty" | bash -i
@@ -137,12 +138,16 @@ wipe-doc:
cov: wipe-cov reset verify-python-path $(PAPI_INSTALL_DONE)
@lcov --zerocounters --directory $(VPP_TEST_BUILD_DIR)
+ @test -z "$(EXTERN_COV_DIR)" || lcov --zerocounters --directory $(EXTERN_COV_DIR)
$(call retest-func)
@mkdir $(BUILD_COV_DIR)
@lcov --capture --directory $(VPP_TEST_BUILD_DIR) --output-file $(BUILD_COV_DIR)/coverage.info
+ @test -z "$(EXTERN_COV_DIR)" || lcov --capture --directory $(EXTERN_COV_DIR) --output-file $(BUILD_COV_DIR)/extern-coverage.info
@genhtml $(BUILD_COV_DIR)/coverage.info --output-directory $(BUILD_COV_DIR)/html
+ @test -z "$(EXTERN_COV_DIR)" || genhtml $(BUILD_COV_DIR)/extern-coverage.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"
.PHONY: wipe-cov
@@ -203,6 +208,7 @@ help:
@echo " COREDUMP_SIZE=unlimited"
@echo " EXTERN_TESTS=<path> - path to out-of-tree test_<name>.py files containing test cases"
@echo " EXTERN_PLUGINS=<path>- path to out-of-tree plugins to be loaded by vpp under test"
+ @echo " EXTERN_COV_DIR=<path>- path to out-of-tree prefix, where source, object and .gcda files can be found for coverage report"
@echo ""
@echo "Creating test documentation"
@echo " test-doc - generate documentation for test framework"