From ee46333def6bfcec25ae255d144e03f0d3c23030 Mon Sep 17 00:00:00 2001 From: Stefan Strigler Date: Mon, 9 Jun 2025 16:26:00 +0200 Subject: [PATCH] add make target test- Eg. invoke common test for specific test group only like $ CT_BACKEND=mnesia,redis make test-antispam_single --- Makefile.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile.in b/Makefile.in index c10ff390d..cf7480702 100644 --- a/Makefile.in +++ b/Makefile.in @@ -661,6 +661,17 @@ test: @cd priv && ln -sf ../sql $(REBAR) $(SKIPDEPS) ct +.PHONY: test-% +define test-group-target +test-$1: + $(REBAR) $(SKIPDEPS) ct --suite=test/ejabberd_SUITE --group=$1 +endef + +ifneq ($(filter test-%,$(MAKECMDGOALS)),) +group_to_test := $(patsubst test-%,%,$(filter test-%,$(MAKECMDGOALS))) +$(eval $(call test-group-target,$(group_to_test))) +endif + test-eunit: $(REBAR) $(SKIPDEPS) eunit --verbose @@ -711,6 +722,7 @@ help: @echo " hooks Run hooks validator" @echo " test Run Common Tests suite [rebar3]" @echo " test-eunit Run EUnit suite [rebar3]" + @echo " test- Run Common Test suite for specific group only [rebar3]" @echo " xref Run cross reference analysis [rebar3]" #.