From 66486691ee1c5c768c74e402b8b95902b88d90fb Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 18 Aug 2026 13:37:48 +0200 Subject: [PATCH] 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 e669179681044514099ca726dbaa55653528f4fb #22616 Follow-up to 58cb1e2f1fa8d8f1c71596918707e566c6353cb2 #22618 Cherry-picked from #22617 Closes #22619 --- tests/runtests.pl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 864a344f9e..b5a2b4df9c 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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 #