X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Frun_tests.pl;h=c91478327470b213a28de3c45a0c6a081518b2fd;hp=7e61282f16cad6e69353b4f497ed8729d5faad38;hb=df7421ccb45fffc1dd81be6e1296fa8a3b512d10;hpb=25be5f44b81e1c45e15e689ba55713e455dfe624;ds=sidebyside diff --git a/test/run_tests.pl b/test/run_tests.pl index 7e61282f16..c914783274 100644 --- a/test/run_tests.pl +++ b/test/run_tests.pl @@ -12,7 +12,7 @@ my $recipesdir = catdir($top, "test", "recipes"); my $testlib = catdir($top, "test", "testlib"); my $utillib = catdir($top, "util"); -# It seems that $switches is getting interpretted with 'eval' or something +# It seems that $switches is getting interpreted with 'eval' or something # like that, and that we need to take care of backslashes or they will # disappear along the way. $testlib =~ s|\\|\\\\|g if $^O eq "MSWin32"; @@ -26,7 +26,8 @@ my @tests = ( "alltests" ); if (@ARGV) { @tests = @ARGV; } -if (grep /^alltests$/, @tests) { +my $list_mode = scalar(grep /^list$/, @tests) != 0; +if (grep /^alltests|list$/, @tests) { @tests = grep { basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/ } glob(catfile($recipesdir,"*.t")); @@ -40,6 +41,12 @@ if (grep /^alltests$/, @tests) { @tests = @t; } -@tests = map { abs2rel($_, rel2abs(curdir())); } @tests; +if ($list_mode) { + @tests = map { $_ = basename($_); $_ =~ s/^[0-9][0-9]-//; $_ =~ s/\.t$//; + $_ } @tests; + print join("\n", @tests), "\n"; +} else { + @tests = map { abs2rel($_, rel2abs(curdir())); } @tests; -runtests(sort @tests); + runtests(sort @tests); +}