]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: enable 'hyper mode' only for HTTP tests
authorDaniel Stenberg <daniel@haxx.se>
Thu, 3 Jun 2021 16:10:44 +0000 (18:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Jun 2021 21:08:47 +0000 (23:08 +0200)
The 'hyper mode' makes line-ending checks work in the test suite for
when hyper is used. Now it also requires that HTTP or HTTPS are
mentioned as keywords to be enabled so that it doesn't wrongly adjusts
tests for other protocols.

This makes test 271 (TFTP) work again in hyper enabled builds.

Closes #7185

.travis.yml
tests/FILEFORMAT.md
tests/runtests.pl

index 210a0de329d3f382c0fe7304d47609cbd3d76858..4947ee4c16273e6a1258389a200ae502cc65dcc3 100644 (file)
@@ -116,7 +116,7 @@ jobs:
         - libbrotli-dev
         - libzstd-dev
   - env:
-    - T=debug HYPER="yes" C="--with-hyper=$HOME/hyper --with-openssl" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 153 220 221 222 223 224 230 232 314 315 316 396 397"
+    - T=debug HYPER="yes" C="--with-hyper=$HOME/hyper --with-openssl" LD_LIBRARY_PATH=$HOME/hyper/target/debug:/usr/local/lib TFLAGS="1 to 153 220 221 222 223 224 230 232 271 314 315 316 396 397"
     addons:
       apt:
         <<: *common_apt
index e5c2a312a4f0abda95235f53ec298395a9323454..b99fd26a942558bb6e787ce60f1d9f8310ba7930 100644 (file)
@@ -177,12 +177,14 @@ that will be checked/used if specified.
 
 ### `<keywords>`
 A newline-separated list of keywords describing what this test case uses and
-tests. Try to use an already used keyword.  These keywords will be used for
-statistical/informational purposes and for choosing or skipping classes
-of tests.  "Keywords" must begin with an alphabetic character, "-", "["
-or "{" and may actually consist of multiple words separated by spaces
-which are treated together as a single identifier.
-
+tests. Try to use already used keywords.  These keywords will be used for
+statistical/informational purposes and for choosing or skipping classes of
+tests.  "Keywords" must begin with an alphabetic character, "-", "[" or "{"
+and may actually consist of multiple words separated by spaces which are
+treated together as a single identifier.
+
+When using curl built with Hyper, the keywords must include HTTP or HTTPS for
+'hyper mode' to kick in and make line ending checks work for tests.
 ## `<reply>`
 
 ### `<data [nocheck="yes"] [sendzero="yes"] [base64="yes"] [hex="yes"]>`
index 696c11a727c50678c135ca548fb980825b8ec802..2a2b4ee1a63bc9bb905f2c08ee8b8acaf9be89ac 100755 (executable)
@@ -3524,7 +3524,8 @@ sub prepro {
         if($show) {
             subVariables(\$s, $testnum, "%");
             subBase64(\$s);
-            subNewlines(\$s) if($has_hyper);
+            subNewlines(\$s) if($has_hyper && ($keywords{"HTTP"} ||
+                                               $keywords{"HTTPS"}));
             push @out, $s;
         }
     }