]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: script: Add the option --debug to show logs on standard ouput
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 19 Dec 2018 09:22:01 +0000 (10:22 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 20 Dec 2018 09:33:18 +0000 (10:33 +0100)
It implies the option --v. It is handy when you run the same test during a debug
session.

scripts/run-regtests.sh

index 43ba095bdd972ebef6479a943c96ffa7b370ce12..d391416a0a64a5095800d0134d560ead01a8aedb 100755 (executable)
@@ -19,6 +19,9 @@ _help()
     --v, to run verbose
       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
       run-regtests.sh --varnishtestparams "-n 10"
 
@@ -252,6 +255,10 @@ _process() {
         --v)
           verbose=""
           ;;
+        --debug)
+          verbose=""
+          debug="-v"
+          ;;
         --LEVEL)
           LEVEL="$2"
           shift
@@ -287,6 +294,7 @@ REGTESTS=""
 
 jobcount=""
 verbose="-q"
+debug=""
 testlist=""
 
 _process "$@";
@@ -404,7 +412,7 @@ if [ -n "$testlist" ]; then
   if [ -n "$jobcount" ]; then
     jobcount="-j $jobcount"
   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
   _vtresult=$?
 else