diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-05-31 17:00:38 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-01 15:07:51 +0200 |
commit | 7e8d6bafd0347de8653c336e6f067d8f3686a386 (patch) | |
tree | 27245abb7e3edc59c934f9216d0b0cba9b3067fe /test | |
parent | 86825c99172f46da40867292a0eeebb2ef289c02 (diff) |
Make the 00-prep_*.t recipe truly mandatory
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15550)
Diffstat (limited to 'test')
-rw-r--r-- | test/run_tests.pl | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/run_tests.pl b/test/run_tests.pl index 9f34ab9e7e..ea054bc189 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 @@ -306,6 +308,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); # $ret->has_errors may be any number, not just 0 or 1. On VMS, numbers |