runtests: divide minimum required tests by subsets

When the minimum comes from `CURL_TEST_MIN`, to improve the default
behavior. It may still need manual adjustment in cases.

Follow-up to e669179681 #22616
Follow-up to 58cb1e2f1f #22618
Cherry-picked from #22617

Closes #22619
This commit is contained in:
Viktor Szakats 2026-08-18 13:37:48 +02:00
parent e669179681
commit 66486691ee
No known key found for this signature in database

View file

@ -2346,12 +2346,10 @@ if(@ARGV && $ARGV[-1] eq '$TFLAGS') {
push(@ARGV, split(' ', $ENV{'TFLAGS'})) if defined($ENV{'TFLAGS'});
}
if($ENV{"CURL_TEST_MIN"}) {
$mintotal = $ENV{"CURL_TEST_MIN"};
}
$args = join(' ', @ARGV);
my $mintotalany = 0;
$valgrind = checktestcmd("valgrind");
my $number = 0;
my $fromnum = -1;
@ -2450,6 +2448,7 @@ while(@ARGV) {
elsif($ARGV[0] =~ /--min=(\d+)/) {
my ($num) = ($1);
$mintotal = $num;
$mintotalany = 1;
}
elsif($ARGV[0] eq "-n") {
# no valgrind
@ -2761,6 +2760,13 @@ if(!$jobs) {
setlogfunc(\&logmsg);
}
if(!$mintotalany && $ENV{"CURL_TEST_MIN"}) {
$mintotal = $ENV{"CURL_TEST_MIN"};
if($useshares) {
$mintotal /= $useshares;
}
}
#######################################################################
# Output curl version and host info being tested
#