/build-root/*.tar.xz
/build-root/*.changes
/build-root/rpmbuild/
-/build-root/test-coverage/
+/build-root/test-coverage*/
/build-root/test/
/build-config.mk
/build/external/*.tar.gz
@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 " build-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"
install-deps: install-dep
define make
- @$(MAKE) -C $(BR) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
+ @$(MAKE) -C $(BR) CC=$(CC) PLATFORM=$(PLATFORM) TAG=$(1) $(2)
endef
$(BR)/scripts/.version:
build-release: $(BR)/.deps.ok
$(call make,$(PLATFORM),$(addsuffix -install,$(TARGETS)))
-.PHONY: build-vpp-gcov
-build-vpp-gcov:
- $(call test,vpp_gcov)
+.PHONY: build-gcov
+build-gcov: $(BR)/.deps.ok
+ $(eval CC=gcc)
+ $(call make,vpp_gcov,$(addsuffix -install,$(TARGETS)))
.PHONY: wipe-release
wipe-release: test-wipe $(BR)/.deps.ok
$(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
+test-cov-hs: build-gcov
+ @$(MAKE) -C extras/hs-test test-cov \
+ VPP_BUILD_DIR=$(BR)/build-vpp_gcov-native/vpp
+
+.PHONY: test-cov-post-standalone
+test-cov-post-standalone:
+ $(MAKE) -C test cov-post VPP_BUILD_DIR=$(BR)/build-vpp_gcov-native/vpp
.PHONY: test-cov-both
test-cov-both:
ARCH=$(shell dpkg --print-architecture)
endif
+ifeq ($(NO_COLOR),)
+VERBOSE=false
+endif
+
FORCE_BUILD?=true
.PHONY: help
@echo " REPEAT=[n] - repeat tests up to N times or until a failure occurs"
@echo " CPU0=[true|false] - use cpu0"
@echo " DRYRUN=[true|false] - set up containers but don't run tests"
+ @echo " NO_COLOR=[true|false] - disables colorful Docker and Ginkgo output"
.PHONY: list-tests
list-tests:
.PHONY: build-vpp-gcov
build-vpp-gcov:
- @$(MAKE) -C ../.. build-vpp-gcov
+ @$(MAKE) -C ../.. build-gcov
.build.ok: build
@touch .build.ok
-.build.cov.ok: build-vpp-gcov
- @touch .build.cov.ok
+.build.cov.ok: build-cov
+ @touch .build.ok
.build_debug.ok: build-debug
@touch .build.ok
@bash ./hs_test.sh --persist=$(PERSIST) --verbose=$(VERBOSE) \
--unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
--vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT) --cpu0=$(CPU0) \
- --dryrun=$(DRYRUN) --skip=$(SKIP); \
+ --dryrun=$(DRYRUN) --skip=$(SKIP) --no_color=$(NO_COLOR); \
./script/compress.sh $$?
.PHONY: test-debug
@bash ./hs_test.sh --persist=$(PERSIST) --verbose=$(VERBOSE) \
--unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
--vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT) --debug_build=true \
- --cpu0=$(CPU0) --dryrun=$(DRYRUN) --skip=$(SKIP); \
+ --cpu0=$(CPU0) --dryrun=$(DRYRUN) --skip=$(SKIP) --no_color=$(NO_COLOR); \
./script/compress.sh $$?
+.PHONY: wipe-lcov
+wipe-lcov:
+ @lcov --zerocounters --directory $(WS_ROOT)/build-root/build-vpp_gcov-native/vpp
+
.PHONY: test-cov
-test-leak: FORCE_BUILD=false
-test-cov: .deps.ok .build.cov.ok
+test-cov: FORCE_BUILD=false
+test-cov: .deps.ok .build.cov.ok wipe-lcov
@bash ./hs_test.sh --persist=$(PERSIST) --verbose=$(VERBOSE) \
--unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST-HS) --cpus=$(CPUS) \
- --vppsrc=$(VPPSRC) --cpu0=$(CPU0) --dryrun=$(DRYRUN) --skip=$(SKIP); \
+ --vppsrc=$(VPPSRC) --cpu0=$(CPU0) --dryrun=$(DRYRUN) --skip=$(SKIP) --no_color=$(NO_COLOR); \
./script/compress.sh $$?
+ $(MAKE) -C ../.. test-cov-post-standalone HS_TEST=1
.PHONY: test-leak
test-leak: .deps.ok .build_debug.ok
tc_names=()
skip_names=()
dryrun=
+no_color=
for i in "$@"
do
leak_check_set=1
fi
;;
+ --no_color=*)
+ no_color="${i#*=}"
+ if [ "$no_color" = "true" ]; then
+ ginkgo_args="$ginkgo_args --no-color"
+ fi
+ ;;
esac
done
"*/vnet/ethernet/ethernet_format_fns.h" \
"*/plugins/ikev2/ikev2_format.c" "*/vnet/bier/bier_types.c"
-COV_REM_ALT_TEST="*/plugins/hs_apps/*" "*/plugins/http/*.h"
-
.PHONY: cov-post
cov-post: wipe-cov $(BUILD_COV_DIR)
- @lcov --ignore-errors --capture \
+ @lcov --ignore-errors unused,empty,mismatch,gcov --capture \
--directory $(VPP_BUILD_DIR) \
--output-file $(BUILD_COV_DIR)/coverage$(HS_TEST).info
@test -z "$(EXTERN_COV_DIR)" || \
- lcov --ignore-errors --capture \
+ lcov --ignore-errors unused,empty,mismatch,gcov --capture \
--directory $(EXTERN_COV_DIR) \
--output-file $(BUILD_COV_DIR)/extern-coverage$(HS_TEST).info
- @lcov --ignore-errors --remove $(BUILD_COV_DIR)/coverage$(HS_TEST).info \
+ @lcov --ignore-errors unused,empty,mismatch,gcov --remove $(BUILD_COV_DIR)/coverage$(HS_TEST).info \
$(COV_REM_NOT_CODE) \
$(COV_REM_DRIVERS) \
$(COV_REM_TODO_NO_TEST) \
$(COV_REM_UNUSED_FEAT) \
- $(COV_REM_ALT_TEST) \
-o $(BUILD_COV_DIR)/coverage-filtered$(HS_TEST).info
@genhtml $(BUILD_COV_DIR)/coverage-filtered$(HS_TEST).info \
--output-directory $(BUILD_COV_DIR)/html