tests: fix prechecks to call the bundle libtest tool

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 2c27a67daa #17590
Follow-up to 71cf0d1fca #14772

Closes #18099
This commit is contained in:
Viktor Szakats 2025-07-30 13:15:20 +02:00
parent e32a6dc510
commit 801800aca2
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 7 additions and 5 deletions

View 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>

View file

@ -22,7 +22,7 @@ Content-Length: 0
# Client-side
<client>
<precheck>
./libtest/lib%TESTNUMBER check
%LIBTESTS lib%TESTNUMBER check
</precheck>
<server>
http

View 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>

View 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>

View 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>

View 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;