From: Viktor Szakats Date: Wed, 30 Jul 2025 11:15:20 +0000 (+0200) Subject: tests: fix prechecks to call the bundle libtest tool X-Git-Tag: curl-8_16_0~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=801800aca24a2186d4f13f2db1524b7270211273;p=thirdparty%2Fcurl.git 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 2c27a67daa1b76859c18d63e4e1f528db05b5e13 #17590 Follow-up to 71cf0d1fca9e1f53524e1545ef0c08d174458d80 #14772 Closes #18099 --- diff --git a/tests/data/test1517 b/tests/data/test1517 index c9b5e2e8c4..5f05379595 100644 --- a/tests/data/test1517 +++ b/tests/data/test1517 @@ -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 -./libtest/lib%TESTNUMBER check +%LIBTESTS lib%TESTNUMBER check diff --git a/tests/data/test1960 b/tests/data/test1960 index 1ab180c525..cf36b17592 100644 --- a/tests/data/test1960 +++ b/tests/data/test1960 @@ -22,7 +22,7 @@ Content-Length: 0 # Client-side -./libtest/lib%TESTNUMBER check +%LIBTESTS lib%TESTNUMBER check http diff --git a/tests/data/test518 b/tests/data/test518 index acc4319dd3..2fa7bfb5ca 100644 --- a/tests/data/test518 +++ b/tests/data/test518 @@ -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 -./libtest/lib%TESTNUMBER check +%LIBTESTS lib%TESTNUMBER check diff --git a/tests/data/test537 b/tests/data/test537 index 7ef864443f..c227a72cb1 100644 --- a/tests/data/test537 +++ b/tests/data/test537 @@ -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 -./libtest/lib%TESTNUMBER check +%LIBTESTS lib%TESTNUMBER check diff --git a/tests/data/test678 b/tests/data/test678 index bcf68e4f11..ea91ae6aec 100644 --- a/tests/data/test678 +++ b/tests/data/test678 @@ -41,7 +41,7 @@ https://localhost:%HTTPSPORT/%TESTNUMBER %CERTDIR/certs/test-ca.crt # Ensure that we're running on localhost because we're checking the host name -./libtest/lib%TESTNUMBER check +%LIBTESTS lib%TESTNUMBER check diff --git a/tests/servers.pm b/tests/servers.pm index df32ca7e4e..02415c6ff5 100644 --- a/tests/servers.pm +++ b/tests/servers.pm @@ -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;