提交 fa657fc8 编写于 作者: R Richard Levitte

Make OpenSSL::Test::setup() a bit more forgiving

It was unexpected that OpenSSL::Test::setup() should be called twice
by the same recipe.  However, that may happen if a recipe combines
OpenSSL::Test and OpenSSL::Test::Simple, which can be a sensible thing
to do.  Therefore, we now allow it.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 db922318
...@@ -121,9 +121,15 @@ is defined). ...@@ -121,9 +121,15 @@ is defined).
=cut =cut
sub setup { sub setup {
my $old_test_name = $test_name;
$test_name = shift; $test_name = shift;
BAIL_OUT("setup() must receive a name") unless $test_name; BAIL_OUT("setup() must receive a name") unless $test_name;
warn "setup() detected test name change. Innocuous, so we continue...\n"
if $old_test_name && $old_test_name ne $test_name;
return if $old_test_name;
BAIL_OUT("setup() needs \$TOP or \$SRCTOP and \$BLDTOP to be defined") BAIL_OUT("setup() needs \$TOP or \$SRCTOP and \$BLDTOP to be defined")
unless $ENV{TOP} || ($ENV{SRCTOP} && $ENV{BLDTOP}); unless $ENV{TOP} || ($ENV{SRCTOP} && $ENV{BLDTOP});
BAIL_OUT("setup() found both \$TOP and \$SRCTOP or \$BLDTOP...") BAIL_OUT("setup() found both \$TOP and \$SRCTOP or \$BLDTOP...")
...@@ -131,8 +137,8 @@ sub setup { ...@@ -131,8 +137,8 @@ sub setup {
__env(); __env();
BAIL_OUT("setup() expects the file Configure in the \$TOP directory") BAIL_OUT("setup() expects the file Configure in the source top directory")
unless -f srctop_file("Configure"); unless -f srctop_file("Configure");
__cwd($directories{RESULTS}); __cwd($directories{RESULTS});
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册