[openssl] master update

Matt Caswell matt at openssl.org
Mon Jun 7 10:07:26 UTC 2021


The branch master has been updated
       via  8984b552e74761c30f87b33cd5f0b436a27f8cbc (commit)
      from  dce7272d08601929a494b9367f4e70163c524cb3 (commit)


- Log -----------------------------------------------------------------
commit 8984b552e74761c30f87b33cd5f0b436a27f8cbc
Author: Matt Caswell <matt at openssl.org>
Date:   Fri Jun 4 09:39:32 2021 +0100

    Fix generate_ssl_tests.pl
    
    Fix the generate_ssl_tests.pl script so that it can be run standalone from
    the command line according to the instructions in test/README.ssltest.md
    
    Fixes #11430
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15617)

-----------------------------------------------------------------------

Summary of changes:
 test/generate_ssl_tests.pl | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/test/generate_ssl_tests.pl b/test/generate_ssl_tests.pl
index cdb35cc150..1783d1729e 100644
--- a/test/generate_ssl_tests.pl
+++ b/test/generate_ssl_tests.pl
@@ -11,22 +11,30 @@
 use strict;
 use warnings;
 
+use Cwd qw/abs_path/;
 use File::Basename;
 use File::Spec::Functions;
 
 use OpenSSL::Test qw/srctop_dir srctop_file/;
 use OpenSSL::Test::Utils;
 
-# This block needs to run before 'use lib srctop_dir' directives.
-BEGIN {
-    OpenSSL::Test::setup("no_test_here", quiet => 1);
-}
-
 use FindBin;
 use lib "$FindBin::Bin/../util/perl";
 use OpenSSL::fallback "$FindBin::Bin/../external/perl/MODULES.txt";
 use Text::Template 1.46;
 
+my $input_file;
+my $provider;
+
+BEGIN {
+    #Input file may be relative to cwd, but setup below changes the cwd, so
+    #figure out the absolute path first
+    $input_file = abs_path(shift);
+    $provider = shift;
+
+    OpenSSL::Test::setup("no_test_here", quiet => 1);
+}
+
 use lib "$FindBin::Bin/ssl-tests";
 
 use vars qw/@ISA/;
@@ -140,8 +148,6 @@ sub read_config {
     warn $@ if $@;
 }
 
-my $input_file = shift;
-my $provider = shift;
 # Reads the tests into ssltests::tests.
 read_config($input_file, $provider);
 print_templates();


More information about the openssl-commits mailing list