REGTEST: Switch to vtest.

This patch replace the usage of the formerly varnish cache reg
testing program, name varnishtest by the new standalone one: vtest.
This commit is contained in:
Frédéric Lécaille 2019-01-11 10:10:21 +01:00 committed by Willy Tarreau
parent 0923fa4200
commit 4336123b5c
2 changed files with 19 additions and 19 deletions

View File

@ -101,7 +101,7 @@
# SUBVERS : add a sub-version (eg: platform, model, ...).
# VERDATE : force haproxy's release date.
#
# VARNISHTEST_PROGRAM : location of the varnishtest program to run reg-tests.
# VTEST_PROGRAM : location of the vtest program to run reg-tests.
# verbosity: pass V=1 for verbose shell invocation
V = 0
@ -1113,10 +1113,10 @@ reg-tests:
reg-tests-help:
@echo
@echo "To launch the reg tests for haproxy, first export to your environment VARNISHTEST_PROGRAM variable to point to your varnishtest program:"
@echo " $$ export VARNISHTEST_PROGRAM=/opt/local/bin/varnishtest"
@echo "To launch the reg tests for haproxy, first export to your environment VTEST_PROGRAM variable to point to your vtest program:"
@echo " $$ export VTEST_PROGRAM=/opt/local/bin/vtest"
@echo "or"
@echo " $$ setenv VARNISHTEST_PROGRAM /opt/local/bin/varnishtest"
@echo " $$ setenv VTEST_PROGRAM /opt/local/bin/vtest"
@echo
@echo "The same thing may be done to set your haproxy program with HAPROXY_PROGRAM but with ./haproxy as default value."
@echo
@ -1124,7 +1124,7 @@ reg-tests-help:
@echo " $$ make reg-tests"
@echo
@echo "You can also set the programs to be used on the command line:"
@echo " $$ VARNISHTEST_PROGRAM=<...> HAPROXY_PROGRAM=<...> make reg-tests"
@echo " $$ VTEST_PROGRAM=<...> HAPROXY_PROGRAM=<...> make reg-tests"
@echo
@echo "To run tests with specific levels:"
@echo " $$ LEVEL=1,3,4 make reg-tests #list of levels"

View File

@ -13,11 +13,11 @@ _help()
run-regtests.sh ./tests1 ./tests2
Parameters:
--j <NUM>, To run varnishtest with multiple jobs / threads for a faster overall result
--j <NUM>, To run vtest with multiple jobs / threads for a faster overall result
run-regtests.sh ./fasttest --j 16
--v, to run verbose
run-regtests.sh --v, disables the default varnishtest 'quiet' parameter
run-regtests.sh --v, disables the default vtest 'quiet' parameter
--debug to show test logs on standard ouput (implies --v)
run-regtests.sh --debug
@ -25,8 +25,8 @@ _help()
--keep-logs to keep all log directories (by default kept if test fails)
run-regtests.sh --keep-logs
--varnishtestparams <ARGS>, passes custom ARGS to varnishtest
run-regtests.sh --varnishtestparams "-n 10"
--vtestparams <ARGS>, passes custom ARGS to vtest
run-regtests.sh --vtestparams "-n 10"
--clean to cleanup previous reg-tests log directories and exit
run-regtests.sh --clean
@ -54,12 +54,12 @@ _help()
#REQUIRE_VERSION=0.0
#REQUIRE_VERSION_BELOW=99.9
Configure environment variables to set the haproxy and varnishtest binaries to use
Configure environment variables to set the haproxy and vtest binaries to use
setenv HAPROXY_PROGRAM /usr/local/sbin/haproxy
setenv VARNISHTEST_PROGRAM /usr/local/bin/varnishtest
setenv VTEST_PROGRAM /usr/local/bin/vtest
or
export HAPROXY_PROGRAM=/usr/local/sbin/haproxy
export VARNISHTEST_PROGRAM=/usr/local/bin/varnishtest
export VTEST_PROGRAM=/usr/local/bin/vtest
EOF
exit 0
}
@ -248,8 +248,8 @@ _process() {
jobcount="$2"
shift
;;
--varnishtestparams)
varnishtestparams="$2"
--vtestparams)
vtestparams="$2"
shift
;;
--v)
@ -294,7 +294,7 @@ _version() {
HAPROXY_PROGRAM="${HAPROXY_PROGRAM:-${PWD}/haproxy}"
VARNISHTEST_PROGRAM="${VARNISHTEST_PROGRAM:-varnishtest}"
VTEST_PROGRAM="${VTEST_PROGRAM:-vtest}"
TESTDIR="${TMPDIR:-/tmp}"
REGTESTS=""
@ -315,8 +315,8 @@ if ! [ -x "$(command -v $HAPROXY_PROGRAM)" ]; then
echo "haproxy not found in path, please specify HAPROXY_PROGRAM environment variable"
preparefailed=1
fi
if ! [ -x "$(command -v $VARNISHTEST_PROGRAM)" ]; then
echo "varnishtest not found in path, please specify VARNISHTEST_PROGRAM environment variable"
if ! [ -x "$(command -v $VTEST_PROGRAM)" ]; then
echo "vtest not found in path, please specify VTEST_PROGRAM environment variable"
preparefailed=1
fi
if [ $preparefailed ]; then
@ -424,14 +424,14 @@ else
done
fi
echo "########################## Starting varnishtest ##########################"
echo "########################## Starting vtest ##########################"
echo "Testing with haproxy version: $HAPROXY_VERSION"
_vtresult=0
if [ -n "$testlist" ]; then
if [ -n "$jobcount" ]; then
jobcount="-j $jobcount"
fi
cmd="$VARNISHTEST_PROGRAM -k -t 10 -Dno-htx=${no_htx} $keep_logs $verbose $debug $jobcount $varnishtestparams $testlist"
cmd="$VTEST_PROGRAM -k -t 10 -Dno-htx=${no_htx} $keep_logs $verbose $debug $jobcount $vtestparams $testlist"
eval $cmd
_vtresult=$?
else