REGTEST: script: Add the option --debug to show logs on standard ouput

It implies the option --v. It is handy when you run the same test during a debug
session.
This commit is contained in:
Christopher Faulet 2018-12-19 10:22:01 +01:00
parent 8d0fdf5ef2
commit 2a7cf922c1

View File

@ -19,6 +19,9 @@ _help()
--v, to run verbose --v, to run verbose
run-regtests.sh --v, disables the default varnishtest 'quiet' parameter run-regtests.sh --v, disables the default varnishtest 'quiet' parameter
--debug to show test logs on standard ouput (implies --v)
run-regtests.sh --debug
--varnishtestparams <ARGS>, passes custom ARGS to varnishtest --varnishtestparams <ARGS>, passes custom ARGS to varnishtest
run-regtests.sh --varnishtestparams "-n 10" run-regtests.sh --varnishtestparams "-n 10"
@ -252,6 +255,10 @@ _process() {
--v) --v)
verbose="" verbose=""
;; ;;
--debug)
verbose=""
debug="-v"
;;
--LEVEL) --LEVEL)
LEVEL="$2" LEVEL="$2"
shift shift
@ -287,6 +294,7 @@ REGTESTS=""
jobcount="" jobcount=""
verbose="-q" verbose="-q"
debug=""
testlist="" testlist=""
_process "$@"; _process "$@";
@ -404,7 +412,7 @@ if [ -n "$testlist" ]; then
if [ -n "$jobcount" ]; then if [ -n "$jobcount" ]; then
jobcount="-j $jobcount" jobcount="-j $jobcount"
fi fi
cmd="$VARNISHTEST_PROGRAM -l -k -t 10 $verbose $jobcount $varnishtestparams $testlist" cmd="$VARNISHTEST_PROGRAM -l -k -t 10 $verbose $debug $jobcount $varnishtestparams $testlist"
eval $cmd eval $cmd
_vtresult=$? _vtresult=$?
else else