]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: fix prechecks to call the bundle libtest tool
authorViktor Szakats <commit@vsz.me>
Wed, 30 Jul 2025 11:15:20 +0000 (13:15 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 30 Jul 2025 12:21:17 +0000 (14:21 +0200)
Some tests make a hard-coded call to the libtest binary in the precheck
step. With bundle builds the binary changed name and calling convention.
Before this patch these tests failed the pre-check and did not run for
the 5 affected tests: 518, 537, 678, 1517, 1960

Fixing, e.g.:
```
test 1517 SKIPPED: precheck command error
```
https://github.com/curl/curl/actions/runs/16611990422/job/46996698437?pr=18039#step:13:4832

It also fixes builds with a custom `CURL_DIRSUFFIX` set.

Follow-up to 2c27a67daa1b76859c18d63e4e1f528db05b5e13 #17590
Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772

Closes #18099

tests/data/test1517
tests/data/test1960
tests/data/test518
tests/data/test537
tests/data/test678
tests/servers.pm

index c9b5e2e8c4a4528623cff4a04133a2a1f39afea2..5f053795958c087f8d447a9c747f1a29ddb2d974 100644 (file)
@@ -46,7 +46,7 @@ lib%TESTNUMBER
 # precheck is a command line to run before the test, to see if we can execute
 # the test or not
 <precheck>
-./libtest/lib%TESTNUMBER check
+%LIBTESTS lib%TESTNUMBER check
 </precheck>
 
 <name>
index 1ab180c52514ab522bab700d2ce176c6f968cfa5..cf36b175921bdaaff14a346202f89ad1fd8c79dc 100644 (file)
@@ -22,7 +22,7 @@ Content-Length: 0
 # Client-side
 <client>
 <precheck>
-./libtest/lib%TESTNUMBER check
+%LIBTESTS lib%TESTNUMBER check
 </precheck>
 <server>
 http
index acc4319dd3bdc288752c8bb0f53bc8637872c7d1..2fa7bfb5ca51e0e4e257401abdf6b4153d4f8905 100644 (file)
@@ -40,7 +40,7 @@ lib%TESTNUMBER
 # precheck is a command line to run before the test, to see if we can execute
 # the test or not
 <precheck>
-./libtest/lib%TESTNUMBER check
+%LIBTESTS lib%TESTNUMBER check
 </precheck>
 
 <name>
index 7ef864443fec0429c3c22271872fbed401bd1351..c227a72cb15a1c89019f00b7a72620d7b6e64651 100644 (file)
@@ -40,7 +40,7 @@ lib%TESTNUMBER
 # precheck is a command line to run before the test, to see if we can execute
 # the test or not
 <precheck>
-./libtest/lib%TESTNUMBER check
+%LIBTESTS lib%TESTNUMBER check
 </precheck>
 
 <name>
index bcf68e4f11d36b48d13daf87e9d845278b7dcae6..ea91ae6aecd4fb34c066ac690d0ddc0d1963fd47 100644 (file)
@@ -41,7 +41,7 @@ https://localhost:%HTTPSPORT/%TESTNUMBER %CERTDIR/certs/test-ca.crt
 </command>
 # Ensure that we're running on localhost because we're checking the host name
 <precheck>
-./libtest/lib%TESTNUMBER check
+%LIBTESTS lib%TESTNUMBER check
 </precheck>
 </client>
 
index df32ca7e4e13358f097d8dbd07f71c8cde4ffa6c..02415c6ff5da5500d7cd821851a19f773413d2e5 100644 (file)
@@ -3184,6 +3184,8 @@ sub subvariables {
     $$thing =~ s/${prefix}CERTDIR/./g;
     $$thing =~ s/${prefix}USER/$USER/g;
     $$thing =~ s/${prefix}DEV_NULL/$dev_null/g;
+    my $libtests = $LIBDIR . 'libtests' . exe_ext('TOOL');
+    $$thing =~ s/${prefix}LIBTESTS/$libtests/g;
 
     $$thing =~ s/${prefix}SSHSRVMD5/$SSHSRVMD5/g;
     $$thing =~ s/${prefix}SSHSRVSHA256/$SSHSRVSHA256/g;