Commit 2511c12b authored by Richard Levitte's avatar Richard Levitte
Browse files

Better method of skipping all the tests in 00-check_testexes.t



Before trying to read MINFO, we have no idea how many to test for, and
because skip expects to get an exact number somehow, it's better to
use 'plan skip_all'.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 8de4f3d3
Loading
Loading
Loading
Loading
+30 −32
Original line number Diff line number Diff line
@@ -10,8 +10,7 @@ setup("check_testexes");

my $MINFO = top_file("MINFO");

 SKIP: {
     skip "because $MINFO not found. If you want this test to run, please do 'perl util/mkfiles.pl > $MINFO'"
plan skip_all => "because MINFO not found. If you want this test to run, please do 'perl util/mkfiles.pl > MINFO'"
    unless open(FH,$MINFO);

while(<FH>) {
@@ -28,7 +27,7 @@ my $MINFO = top_file("MINFO");
s/\s*$//;
my @expected_tests =
    map { s/\..*$//;		# Remove extension
	       s/_?test$//;	# Remove possible underscore
	  s/_?test$//;		# Remove 'test', possibly prefixed with '_'
	  s/(sha\d+)t/$1/;	# sha comes with no t at the end
	  $_; } split(/\s+/, $_);

@@ -42,4 +41,3 @@ my $MINFO = top_file("MINFO");
       "check that a test for $test exists")
	|| diag("Expected to find something matching '[0-9][0-9]-test_$test.t'");
}
}