From: Adrian Villin Date: Thu, 12 Jun 2025 12:35:49 +0000 (+0200) Subject: hs-test: configurable Ginkgo timeout X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F43159%2F5;p=vpp.git hs-test: configurable Ginkgo timeout - global Ginkgo timeout can now be set using GINKGO_TIMEOUT - fixes coverage job timing out because of Ginkgo's default 1h timeout Type: fix Change-Id: Ie1386e3eab31ff843a94b991e43b5270772b7732 Signed-off-by: Adrian Villin --- diff --git a/extras/hs-test/Makefile b/extras/hs-test/Makefile index b02c499194f..c2885b299eb 100644 --- a/extras/hs-test/Makefile +++ b/extras/hs-test/Makefile @@ -69,6 +69,10 @@ ifeq ($(TIMEOUT),) TIMEOUT=5 endif +ifeq ($(GINKGO_TIMEOUT),) +GINKGO_TIMEOUT=3h +endif + FORCE_BUILD?=true .PHONY: help @@ -109,6 +113,7 @@ help: @echo " DRYRUN=[true|false] - set up containers but don't run tests" @echo " NO_COLOR=[true|false] - disables colorful Docker and Ginkgo output" @echo " TIMEOUT=[minutes] - test timeout override (5 minutes by default)" + @echo " GINKGO_TIMEOUT=[Ns/m/h] - Ginkgo timeout override (3h by default)" .PHONY: list-tests list-tests: @@ -143,7 +148,7 @@ test: .deps.ok .build.ok --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \ --vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT) --cpu0=$(CPU0) \ --dryrun=$(DRYRUN) --skip=$(SKIP) --no_color=$(NO_COLOR) --timeout=$(TIMEOUT) \ - --vpp_cpus=$(VPP_CPUS); \ + --ginkgo_timeout=$(GINKGO_TIMEOUT) --vpp_cpus=$(VPP_CPUS); \ ./script/compress.sh $$? .PHONY: test-debug @@ -153,7 +158,7 @@ test-debug: .deps.ok .build_debug.ok --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \ --vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT) --debug_build=true \ --cpu0=$(CPU0) --dryrun=$(DRYRUN) --skip=$(SKIP) --no_color=$(NO_COLOR) --timeout=$(TIMEOUT) \ - --vpp_cpus=$(VPP_CPUS); \ + --ginkgo_timeout=$(GINKGO_TIMEOUT) --vpp_cpus=$(VPP_CPUS); \ ./script/compress.sh $$? .PHONY: wipe-lcov @@ -166,21 +171,22 @@ test-cov: .deps.ok .build.cov.ok wipe-lcov -@bash ./hs_test.sh --coverage=true --persist=$(PERSIST) --verbose=$(VERBOSE) \ --unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST-HS) --cpus=$(CPUS) \ --vppsrc=$(VPPSRC) --cpu0=$(CPU0) --dryrun=$(DRYRUN) --skip=$(SKIP) --no_color=$(NO_COLOR) \ - --timeout=$(TIMEOUT) --vpp_cpus=$(VPP_CPUS); \ + --timeout=$(TIMEOUT) --ginkgo_timeout=$(GINKGO_TIMEOUT) --vpp_cpus=$(VPP_CPUS); \ ./script/compress.sh $$? $(MAKE) -C ../.. test-cov-post-standalone HS_TEST=1 .PHONY: test-leak test-leak: .deps.ok .build_debug.ok @bash ./hs_test.sh --test=$(TEST) --debug_build=true --leak_check=true --vppsrc=$(VPPSRC) --timeout=$(TIMEOUT) \ - --vpp_cpus=$(VPP_CPUS); + --ginkgo_timeout=$(GINKGO_TIMEOUT) --vpp_cpus=$(VPP_CPUS); .PHONY: test-perf test-perf: FORCE_BUILD=false test-perf: .deps.ok .build.ok @bash ./hs_test.sh --persist=$(PERSIST) --verbose=$(VERBOSE) \ --test=$(TEST) --vppsrc=$(VPPSRC) --repeat=$(REPEAT) \ - --skip=$(SKIP) --no_color=$(NO_COLOR) --perf=true --timeout=$(TIMEOUT); \ + --skip=$(SKIP) --no_color=$(NO_COLOR) --perf=true --timeout=$(TIMEOUT) \ + --ginkgo_timeout=$(GINKGO_TIMEOUT); \ ./script/compress.sh $$? .PHONY: setup-cluster diff --git a/extras/hs-test/hs_test.sh b/extras/hs-test/hs_test.sh index eb3607ca899..0254d0b5a9a 100644 --- a/extras/hs-test/hs_test.sh +++ b/extras/hs-test/hs_test.sh @@ -86,6 +86,9 @@ case "${i}" in --parallel=*) ginkgo_args="$ginkgo_args -procs=${i#*=}" ;; + --ginkgo_timeout=*) + ginkgo_args="$ginkgo_args --timeout=${i#*=}" + ;; --repeat=*) ginkgo_args="$ginkgo_args --repeat=${i#*=}" ;; @@ -183,7 +186,9 @@ fi mkdir -p summary # shellcheck disable=SC2086 -sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --json-report=summary/report.json $ginkgo_args -- $args +CMD="sudo -E go run github.com/onsi/ginkgo/v2/ginkgo --json-report=summary/report.json $ginkgo_args -- $args" +echo "$CMD" +$CMD exit_status=$? if [ -e "summary/failed-summary.log" ]; then