aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-12-13 17:27:12 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-12-15 11:54:45 +0100
commit571f2c81d10e9093b4eb91b3714f640af4c9eab1 (patch)
tree8cc629e8201349f0f938f49c754099b8984964d5 /tests/runtests.pl
parent024981cd1e69690a1efe521b32dca47f6f1e70f2 (diff)
runtests: --repeat=[num] to repeat tests
Closes #4715
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 6ee2cca20..27f62edd5 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -186,6 +186,7 @@ my $server_response_maxtime=13;
my $debug_build=0; # built debug enabled (--enable-debug)
my $has_memory_tracking=0; # built with memory tracking (--enable-curldebug)
my $libtool;
+my $repeat = 0;
# name of the file that the memory debugging creates:
my $memdump="$LOGDIR/memdump";
@@ -5053,6 +5054,10 @@ while(@ARGV) {
$shallowseed=$seed?$seed:1234; # get a real seed later
srand($shallowseed); # make it predictable
}
+ elsif($ARGV[0] =~ /--repeat=(\d+)/) {
+ # Repeat-run the given tests this many times
+ $repeat = $1;
+ }
elsif($ARGV[0] eq "-a") {
# continue anyway, even if a test fail
$anyway=1;
@@ -5342,6 +5347,13 @@ else {
}
$TESTCASES = $verified;
}
+if($repeat) {
+ my $s;
+ for(1 .. $repeat) {
+ $s .= $TESTCASES;
+ }
+ $TESTCASES = $s;
+}
if($scrambleorder) {
# scramble the order of the test cases