summaryrefslogtreecommitdiffstats
path: root/extras/hs-test
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2024-04-22 19:47:27 +0200
committerDave Wallace <dwallacelf@gmail.com>2024-04-23 00:37:23 +0000
commitbbee45c80b7b633a7c4f923317ec6d5c26edfcbb (patch)
tree0c264e637e1f83e756dd3a4a8de5b9e660a1134f /extras/hs-test
parentc899ab4e5614bc10b4792754969722677394eea7 (diff)
hs-test: add tests repeat option
Type: test Change-Id: I0143d26d929f6408a5399d7ca536e48cbd9d46bb Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'extras/hs-test')
-rw-r--r--extras/hs-test/Makefile9
-rwxr-xr-xextras/hs-test/test4
2 files changed, 11 insertions, 2 deletions
diff --git a/extras/hs-test/Makefile b/extras/hs-test/Makefile
index 9c4d3454b58..196bca5c25f 100644
--- a/extras/hs-test/Makefile
+++ b/extras/hs-test/Makefile
@@ -27,6 +27,10 @@ ifeq ($(PARALLEL),)
PARALLEL=1
endif
+ifeq ($(REPEAT),)
+REPEAT=0
+endif
+
ifeq ($(VPPSRC),)
VPPSRC=$(shell pwd)/../..
endif
@@ -64,7 +68,8 @@ help:
@echo " TEST=[test-name] - specific test to run"
@echo " CPUS=[n-cpus] - number of cpus to run with vpp"
@echo " VPPSRC=[path-to-vpp-src] - path to vpp source files (for gdb)"
- @echo " PARALLEL=[n-cpus]" - number of test processes to spawn to run in parallel
+ @echo " PARALLEL=[n-cpus] - number of test processes to spawn to run in parallel"
+ @echo " REPEAT=[n] - repeat tests up to N times or until a failure occurs"
@echo
@echo "List of all tests:"
$(call list_tests)
@@ -83,7 +88,7 @@ build-vpp-debug:
test: .deps.ok .build.vpp
@bash ./test --persist=$(PERSIST) --verbose=$(VERBOSE) \
--unconfigure=$(UNCONFIGURE) --debug=$(DEBUG) --test=$(TEST) --cpus=$(CPUS) \
- --vppsrc=$(VPPSRC) --parallel=$(PARALLEL)
+ --vppsrc=$(VPPSRC) --parallel=$(PARALLEL) --repeat=$(REPEAT)
build-go:
go build ./tools/http_server
diff --git a/extras/hs-test/test b/extras/hs-test/test
index 9b18e1b7949..58f08bd68bb 100755
--- a/extras/hs-test/test
+++ b/extras/hs-test/test
@@ -59,6 +59,10 @@ case "${i}" in
;;
--parallel=*)
ginkgo_args="$ginkgo_args -procs=${i#*=}"
+ ;;
+ --repeat=*)
+ ginkgo_args="$ginkgo_args --repeat=${i#*=}"
+ ;;
esac
done