Browse Source

Consolidate the locations where we have our internal perl modules

Instead of having perl modules under test/testlib, util and util/perl,
consolidate them all to be inside util/perl.

Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4069)
master
Richard Levitte 5 years ago
parent
commit
cb6afcd6ee
22 changed files with 18 additions and 12 deletions
  1. +6
    -3
      Configure
  2. +1
    -1
      test/generate_ssl_tests.pl
  3. +1
    -1
      test/recipes/80-test_ssl_new.t
  4. +0
    -1
      test/recipes/tconversion.pl
  5. +2
    -3
      test/run_tests.pl
  6. +6
    -2
      util/dofile.pl
  7. +0
    -0
      util/perl/OpenSSL/Test.pm
  8. +0
    -0
      util/perl/OpenSSL/Test/Simple.pm
  9. +0
    -0
      util/perl/OpenSSL/Test/Utils.pm
  10. +0
    -0
      util/perl/TLSProxy/Certificate.pm
  11. +0
    -0
      util/perl/TLSProxy/CertificateVerify.pm
  12. +0
    -0
      util/perl/TLSProxy/ClientHello.pm
  13. +0
    -0
      util/perl/TLSProxy/EncryptedExtensions.pm
  14. +0
    -0
      util/perl/TLSProxy/HelloRetryRequest.pm
  15. +0
    -0
      util/perl/TLSProxy/Message.pm
  16. +0
    -0
      util/perl/TLSProxy/NewSessionTicket.pm
  17. +0
    -0
      util/perl/TLSProxy/Proxy.pm
  18. +0
    -0
      util/perl/TLSProxy/Record.pm
  19. +0
    -0
      util/perl/TLSProxy/ServerHello.pm
  20. +0
    -0
      util/perl/TLSProxy/ServerKeyExchange.pm
  21. +0
    -0
      util/perl/checkhandshake.pm
  22. +2
    -1
      util/perl/with_fallback.pm

+ 6
- 3
Configure View File

@ -12,6 +12,8 @@
use 5.10.0;
use strict;
use Config;
use FindBin;
use lib "$FindBin::Bin/util/perl";
use File::Basename;
use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
use File::Path qw/mkpath/;
@ -1384,7 +1386,6 @@ my %unified_info = ();
my $buildinfo_debug = defined($ENV{CONFIGURE_DEBUG_BUILDINFO});
if ($builder eq "unified") {
use lib catdir(dirname(__FILE__),"util");
use with_fallback qw(Text::Template);
sub cleandir {
@ -1512,8 +1513,10 @@ if ($builder eq "unified") {
my %generate = ();
push @{$config{build_infos}}, catfile(abs2rel($sourced, $blddir), $f);
my $template = Text::Template->new(TYPE => 'FILE',
SOURCE => catfile($sourced, $f));
my $template =
Text::Template->new(TYPE => 'FILE',
SOURCE => catfile($sourced, $f),
PREPEND => qq{use lib "$FindBin::Bin/util/perl";});
die "Something went wrong with $sourced/$f: $!\n" unless $template;
my @text =
split /^/m,


+ 1
- 1
test/generate_ssl_tests.pl View File

@ -22,7 +22,7 @@ BEGIN {
OpenSSL::Test::setup("no_test_here");
}
use lib srctop_dir("util"); # for with_fallback
use lib srctop_dir("util", "perl"); # for with_fallback
use lib srctop_dir("test", "ssl-tests"); # for ssltests_base
use with_fallback qw(Text::Template);


+ 1
- 1
test/recipes/80-test_ssl_new.t View File

@ -120,7 +120,7 @@ sub test_conf {
skip 'failure', 2 unless
ok(run(perltest(["generate_ssl_tests.pl", $input_file],
interpreter_args => [ "-I", srctop_dir("test", "testlib")],
interpreter_args => [ "-I", srctop_dir("util", "perl")],
stdout => $tmp_file)),
"Getting output from generate_ssl_tests.pl.");


+ 0
- 1
test/recipes/tconversion.pl View File

@ -12,7 +12,6 @@ use warnings;
use File::Compare qw/compare_text/;
use File::Copy;
use lib 'testlib';
use OpenSSL::Test qw/:DEFAULT/;
my %conversionforms = (


+ 2
- 3
test/run_tests.pl View File

@ -25,12 +25,11 @@ my $TAP_Harness = can_load(modules => { 'TAP::Harness' => undef })
my $srctop = $ENV{SRCTOP} || $ENV{TOP};
my $bldtop = $ENV{BLDTOP} || $ENV{TOP};
my $recipesdir = catdir($srctop, "test", "recipes");
my $testlib = catdir($srctop, "test", "testlib");
my $utillib = catdir($srctop, "util");
my $libdir = rel2abs(catdir($srctop, "util", "perl"));
my %tapargs =
( verbosity => $ENV{VERBOSE} || $ENV{V} || $ENV{HARNESS_VERBOSE} ? 1 : 0,
lib => [ $testlib, $utillib ],
lib => [ $libdir ],
switches => '-w',
merge => 1
);


+ 6
- 2
util/dofile.pl View File

@ -14,6 +14,7 @@
use strict;
use warnings;
use FindBin;
use Getopt::Std;
# We actually expect to get the following hash tables from configdata:
@ -38,7 +39,7 @@ package OpenSSL::Template;
# a fallback in case it's not installed on the system
use File::Basename;
use File::Spec::Functions;
use lib catdir(dirname(__FILE__));
use lib "$FindBin::Bin/perl";
use with_fallback qw(Text::Template);
#use parent qw/Text::Template/;
@ -175,7 +176,10 @@ my $text =
# Load the full template (combination of files) into Text::Template
# and fill it up with our data. Output goes directly to STDOUT
my $template = OpenSSL::Template->new(TYPE => 'STRING', SOURCE => $text );
my $template =
OpenSSL::Template->new(TYPE => 'STRING',
SOURCE => $text,
PREPEND => qq{use lib "$FindBin::Bin/perl";});
sub output_reset_on {
$template->output_reset_on();


test/testlib/OpenSSL/Test.pm → util/perl/OpenSSL/Test.pm View File


test/testlib/OpenSSL/Test/Simple.pm → util/perl/OpenSSL/Test/Simple.pm View File


test/testlib/OpenSSL/Test/Utils.pm → util/perl/OpenSSL/Test/Utils.pm View File


util/TLSProxy/Certificate.pm → util/perl/TLSProxy/Certificate.pm View File


util/TLSProxy/CertificateVerify.pm → util/perl/TLSProxy/CertificateVerify.pm View File


util/TLSProxy/ClientHello.pm → util/perl/TLSProxy/ClientHello.pm View File


util/TLSProxy/EncryptedExtensions.pm → util/perl/TLSProxy/EncryptedExtensions.pm View File


util/TLSProxy/HelloRetryRequest.pm → util/perl/TLSProxy/HelloRetryRequest.pm View File


util/TLSProxy/Message.pm → util/perl/TLSProxy/Message.pm View File


util/TLSProxy/NewSessionTicket.pm → util/perl/TLSProxy/NewSessionTicket.pm View File


util/TLSProxy/Proxy.pm → util/perl/TLSProxy/Proxy.pm View File


util/TLSProxy/Record.pm → util/perl/TLSProxy/Record.pm View File


util/TLSProxy/ServerHello.pm → util/perl/TLSProxy/ServerHello.pm View File


util/TLSProxy/ServerKeyExchange.pm → util/perl/TLSProxy/ServerKeyExchange.pm View File


test/testlib/checkhandshake.pm → util/perl/checkhandshake.pm View File


util/with_fallback.pm → util/perl/with_fallback.pm View File


Loading…
Cancel
Save