libtests: make test 1503,1504,1505 use the 1502 binary

Adjust the differences at runtime instead of build-time, to avoid
extra buillds.

Set the `CURL_TESTNUM` env variable to pass test numbers to tests.

Make libtest/first.c use that env variable to set the `testnum` global
variable to allow tests to differ based on which test that runs it.

Closes #17591
This commit is contained in:
Daniel Stenberg 2025-06-11 11:58:27 +02:00
parent aea336aa23
commit 02dd471bbf
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 46 additions and 49 deletions

View file

@ -756,6 +756,9 @@ sub singletest_prepare {
# write the instructions to file
writearray("$LOGDIR/$SERVERCMD", \@ftpservercmd);
# provide an environment variable
$ENV{'CURL_TESTNUM'} = $testnum;
# create (possibly-empty) files before starting the test
for my $partsuffix (('', '1', '2', '3', '4')) {
my @inputfile=getpart("client", "file".$partsuffix);