]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTEST: Use HTX by default and add '--no-htx' option to disable it
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 14:53:41 +0000 (16:53 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Apr 2019 20:06:53 +0000 (22:06 +0200)
Because the HTX is now the default mode in HAProxy, it is also enabled by
default in reg-tests. The option '--use-htx' is still available, but deprecated
and have concretly no effect. To run reg-tests with the legacy HTTP mode, you
should use the option '--no-htx'.

scripts/run-regtests.sh

index c6477cb8d7ce00f73d388b753564e70414318d6a..84a6c1c8ffb7efcae18c344246b12a304c1985b5 100755 (executable)
@@ -31,8 +31,10 @@ _help()
     --clean to cleanup previous reg-tests log directories and exit
       run-regtests.sh --clean
 
-    --use-htx to use the HTX in tests
-      run-regtests.sh --use-htx, unsets the macro \${no-htx}
+    --use-htx to use the HTX in tests (deprecated, the default mode now)
+
+    --no-htx to use the legacy HTTP in tests
+      run-regtests.sh --no-htx, sets the macro \${no-htx}
       In .vtc files, in HAProxy configuration, you should use the following line
       to "templatize" your tests:
 
@@ -269,6 +271,9 @@ _process() {
         --use-htx)
           no_htx=""
           ;;
+        --no-htx)
+          no_htx="no "
+          ;;
         --clean)
           _cleanup
           exit 0
@@ -302,7 +307,7 @@ jobcount=""
 verbose="-q"
 debug=""
 keep_logs="-l"
-no_htx="no "
+no_htx=""
 testlist=""
 
 _process "$@";
@@ -342,15 +347,9 @@ echo "Target : $TARGET"
 echo "Options : $FEATURES"
 
 echo "########################## Gathering tests to run ##########################"
-# if 'use-htx' option is set, but HAProxy version is lower to 1.9, disable it
-if [ -z "$no_htx" ]; then
-  if [ $(_version "$HAPROXY_VERSION") -lt $(_version "1.9") ]; then
-    echo ""
-    echo "WARNING : Unset HTX for haproxy (version: $HAPROXY_VERSION)"
-    echo "    REASON: this test requires at least version: 1.9"
-    echo ""
-    no_htx="#"
-  fi
+# if htx is enable, but HAProxy version is lower to 1.9, disable it
+if [ $(_version "$HAPROXY_VERSION") -lt $(_version "1.9") ]; then
+  no_htx="#"
 fi
 
 if [ -z "$REGTESTS" ]; then