From: Tomas Mraz Date: Mon, 31 May 2021 15:00:38 +0000 (+0200) Subject: Make the 00-prep_*.t recipe truly mandatory X-Git-Tag: openssl-3.0.0-beta1~274 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e8d6bafd0347de8653c336e6f067d8f3686a386;p=thirdparty%2Fopenssl.git Make the 00-prep_*.t recipe truly mandatory Reviewed-by: Paul Dale Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/15550) --- diff --git a/test/run_tests.pl b/test/run_tests.pl index 9f34ab9e7e2..ea054bc1899 100644 --- a/test/run_tests.pl +++ b/test/run_tests.pl @@ -83,7 +83,7 @@ sub reorder { # for parallel test runs, do slow tests first if ($jobs > 1 && $key =~ m/test_ssl_new|test_fuzz/) { - $key =~ s/(\d+)-/00-/; + $key =~ s/(\d+)-/01-/; } return $key; } @@ -131,18 +131,20 @@ foreach my $arg (@ARGV ? @ARGV : ('alltests')) { $initial_arg = 0; } +# prep recipes are mandatory and need to be always run first +my @preps = glob(catfile($recipesdir,"00-prep_*.t")); +foreach my $test (@preps) { + delete $tests{$test}; +} + sub find_matching_tests { my ($glob) = @_; - # prep recipes are mandatory - my @recipes = glob(catfile($recipesdir,"00-prep_*.t")); - if ($glob =~ m|^[\d\[\]\?\-]+$|) { - push @recipes, glob(catfile($recipesdir,"$glob-*.t")); - } else { - push @recipes, glob(catfile($recipesdir,"*-$glob.t")); + return glob(catfile($recipesdir,"$glob-*.t")); } - return @recipes; + + return glob(catfile($recipesdir,"*-$glob.t")); } # The following is quite a bit of hackery to adapt to both TAP::Harness @@ -305,6 +307,10 @@ unless (defined $eres) { my $harness = $package->new(\%tapargs); my $ret = + $harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] } + @preps); +die if $ret->has_errors; +$ret = $harness->runtests(map { [ abs2rel($_, rel2abs(curdir())), basename($_) ] } sort { reorder($a) cmp reorder($b) } keys %tests);