提交 1780e6d9 编写于 作者: R Richard Levitte

Add a method to list available tests

Reviewed-by: NEmilia Käsper <emilia@openssl.org>
上级 187bad4c
......@@ -439,6 +439,10 @@ tests: rehash
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. TESTS='$(TESTS)' OPENSSL_DEBUG_MEMORY=on OPENSSL_CONF=../apps/openssl.cnf tests );
OPENSSL_CONF=apps/openssl.cnf util/opensslwrap.sh version -a
list-tests:
@(cd test && \
$(CLEARENV) && $(MAKE) -e $(BUILDENV) TOP=.. list-tests)
report:
@$(PERL) util/selftest.pl
......
......@@ -153,6 +153,8 @@ tags:
tests: exe apps
TOP=$(TOP) PERL=$(PERL) $(PERL) run_tests.pl $(TESTS)
list-tests:
@TOP=$(TOP) PERL=$(PERL) $(PERL) run_tests.pl list
apps:
@(cd ..; $(MAKE) DIRS=apps all)
......
......@@ -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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册