From a3b4cbff7b2969d986261e59911a75314cb0a2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Wed, 19 Dec 2018 16:27:47 +0100 Subject: [PATCH] REGTEST: Make reg-tests target support argument. With this patch we can provide a list of argument to reg-tests target. Useful to run reg tests for a list of VTC files like that: $ VARNISHTEST_PROGRAM=<...> make reg-tests reg-tests/checks/*.vtc --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 472585116..450622edb 100644 --- a/Makefile +++ b/Makefile @@ -1092,9 +1092,15 @@ opts: @echo 'OPTIONS_OBJS="$(strip $(OPTIONS_OBJS))"' @echo 'OBJS="$(strip $(OBJS))"' +ifeq (reg-tests, $(firstword $(MAKECMDGOALS))) + REGTEST_ARGS := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS)) + $(eval $(REGTEST_ARGS):;@true) +endif + # Target to run the regression testing script files. reg-tests: - ./scripts/run-regtests.sh --LEVEL "$$LEVEL" $(REG_TEST_FILES) + @./scripts/run-regtests.sh --LEVEL "$$LEVEL" $(REGTEST_ARGS) $(REG_TEST_FILES) +.PHONY: $(REGTEST_ARGS) reg-tests-help: @echo