]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1013.pl: require case match for features, order match for protos, fix issue
authorViktor Szakats <commit@vsz.me>
Wed, 28 Aug 2024 09:01:26 +0000 (11:01 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 29 Aug 2024 11:56:05 +0000 (13:56 +0200)
Update the script for test 1013 and 1014 to require:

- case-sensitive match for the curl feature list.
  (Continue to allow case-difference for protocols. They've always been
  in uppercase within curl config.)

- matching order for the protocol list.
  (Continue to allow any order for features. autotools builds on
  platforms without `sort -f` need it. E.g. Old Linux CI)

Also:

- fix casing of the `gsasl` feature in `configure`, to match `curl -V`
  and cmake.

- delete obsolete comment.

Closes #14706

configure.ac
tests/libtest/test1013.pl

index 0b3dc86052032d1f567534fa769c4c4463de3b86..248802941294f38d45eb985d69e3c92911be3e88 100644 (file)
@@ -4938,7 +4938,7 @@ if test "x$curl_psl_msg" = "xenabled"; then
 fi
 
 if test "x$curl_gsasl_msg" = "xenabled"; then
-  SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
+  SUPPORT_FEATURES="$SUPPORT_FEATURES gsasl"
 fi
 
 if test "x$enable_altsvc" = "xyes"; then
index 9ae7723a21448f40bdd25a295bd62b758fbf9960..6d10a3223a534d5344b6ae96e9fc62829f64d728 100755 (executable)
@@ -37,14 +37,13 @@ my $curl_protocols="";
 open(CURL, "$ARGV[1]") || die "Can't get curl $what list\n";
 while( <CURL> )
 {
-    $curl_protocols = lc($_) if ( /$what:/i );
+    $curl_protocols = $_ if ( /$what:/i );
 }
 close CURL;
 
 $curl_protocols =~ s/\r//;
 $curl_protocols =~ /\w+: (.*)$/;
 @curl = split / /,$1;
-@curl = sort @curl;
 
 # Read the output of curl-config
 my @curl_config;
@@ -52,12 +51,16 @@ open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config $what lis
 while( <CURLCONFIG> )
 {
     chomp;
-    # ignore curl-config --features not in curl's feature list
-    push @curl_config, lc($_);
+    $_ = lc($_) if($what eq "protocols");  # accept uppercase protocols in curl-config
+    push @curl_config, $_;
 }
 close CURLCONFIG;
 
-@curl_config = sort @curl_config;
+# allow order mismatch to handle autotools builds with no 'sort -f' available
+if($what eq "features") {
+    @curl = sort @curl;
+    @curl_config = sort @curl_config;
+}
 
 my $curlproto = join ' ', @curl;
 my $curlconfigproto = join ' ', @curl_config;