]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: Make reg-tests target support argument.
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 19 Dec 2018 15:27:47 +0000 (16:27 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 20 Dec 2018 09:37:32 +0000 (10:37 +0100)
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

index 472585116032a0e4560949a1503a2bd47f3f2d0b..450622edb262ccd8351b813e4237bcac559e3dd0 100644 (file)
--- 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