From: Frédéric Lécaille Date: Mon, 25 Jun 2018 09:15:43 +0000 (+0200) Subject: REGTEST/MINOR: Add levels to reg-tests target. X-Git-Tag: v1.9-dev1~187 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26ac8a6c4ed47dbf5d773d59ef09880eaabec8ab;p=thirdparty%2Fhaproxy.git REGTEST/MINOR: Add levels to reg-tests target. With this patch we can provide LEVEL environment variable when running reg-tests Makefile targe (reg testing) to set the execution level of the reg-tests make target to run. LEVEL default value is 1. LEVEL=1 is to run all h*.vtc files which are the most important reg testing files (to test haproxy core, HTTP compliance etc). LEVEL=2 is to run all s*.vtc files which are a bit slow tests, for instance tests requiring external programs (curl, socat etc). LEVEL=3 is to run all l*.vtc files which are test files with again more slow or with little interest. --- diff --git a/Makefile b/Makefile index 9ea3e80ce3..817161f76a 100644 --- a/Makefile +++ b/Makefile @@ -1004,6 +1004,16 @@ reg-tests: echo "Please make the VARNISHTEST_PROGRAM variable point to the location of the varnishtest program."; \ exit 1; \ fi - @find reg-tests -type f -name "*.vtc" -print0 | \ - HAPROXY_PROGRAM=$${HAPROXY_PROGRAM:-$$PWD/haproxy} xargs -0 $(VARNISHTEST_PROGRAM) -l -t5 + @export LEVEL=$${LEVEL:-1}; \ + if [ $$LEVEL = 1 ] ; then \ + EXPR='h*.vtc'; \ + elif [ $$LEVEL = 2 ] ; then \ + EXPR='s*.vtc'; \ + elif [ $$LEVEL = 3 ] ; then \ + EXPR='l*.vtc'; \ + fi ; \ + if [ -n "$$EXPR" ] ; then \ + find reg-tests -type f -name "$$EXPR" -print0 | \ + HAPROXY_PROGRAM=$${HAPROXY_PROGRAM:-$$PWD/haproxy} xargs -r -0 $(VARNISHTEST_PROGRAM) -l -t5 ; \ + fi .PHONY: reg-tests