]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
TEST: Optionally silence OpenSSL::Test::setup()
authorRichard Levitte <levitte@openssl.org>
Sat, 15 Feb 2020 06:18:57 +0000 (07:18 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 18 Feb 2020 08:45:53 +0000 (09:45 +0100)
test/generate_ssl_tests.pl uses OpenSSL::Test to get to some of its
practical location functions.  A recent note in the setup() code made
its result not quite match the original (we do check that), so there's
a need to silence setup(), which we do with a simple optional argument.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11080)

test/generate_ssl_tests.pl
util/perl/OpenSSL/Test.pm

index 044dff6ad484e946cb5f69b9d98575922fc50e5b..8cfc451fbba80178084d917642ae591db4b3870e 100644 (file)
@@ -19,7 +19,7 @@ use OpenSSL::Test::Utils;
 
 # This block needs to run before 'use lib srctop_dir' directives.
 BEGIN {
-    OpenSSL::Test::setup("no_test_here");
+    OpenSSL::Test::setup("no_test_here", quiet => 1);
 }
 
 use FindBin;
index 75ba2d3a6356f776b22159224173cd9212e6e314..42971063925ebe189c78685948865c4c8e325cc1 100644 (file)
@@ -132,6 +132,7 @@ is defined).
 sub setup {
     my $old_test_name = $test_name;
     $test_name = shift;
+    my %opts = @_;
 
     BAIL_OUT("setup() must receive a name") unless $test_name;
     warn "setup() detected test name change.  Innocuous, so we continue...\n"
@@ -149,7 +150,8 @@ sub setup {
     BAIL_OUT("setup() expects the file Configure in the source top directory")
         unless -f srctop_file("Configure");
 
-    note "The results of this test will end up in $directories{RESULTS}";
+    note "The results of this test will end up in $directories{RESULTS}"
+        unless $opts{quiet};
 
     __cwd($directories{RESULTS});
 }