summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-11-03 21:43:07 +0100
committerRichard Levitte <levitte@openssl.org>2017-11-05 22:58:10 +0100
commit470a601705673102b9d33359408bef6334f07078 (patch)
tree56d86f143e681d1d52c4d9bab5d4646976807bbe
parentb81cfa07ada850fd287d0a0c82ba280907f18ce7 (diff)
Consolidate the locations where we have our internal perl modules
Instead of having perl modules under test/testlib and util, consolidate them all to be inside util/perl. (this is an adaptation of the part of #4069 that wasn't included in #4666) Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4667)
-rwxr-xr-xConfigure4
-rw-r--r--test/generate_ssl_tests.pl2
-rw-r--r--test/recipes/80-test_ssl_new.t2
-rw-r--r--test/recipes/tconversion.pl1
-rw-r--r--test/run_tests.pl7
-rw-r--r--util/dofile.pl8
-rwxr-xr-xutil/mkdef.pl2
-rw-r--r--util/perl/OpenSSL/Glob.pm (renamed from util/OpenSSL/Glob.pm)0
-rw-r--r--util/perl/OpenSSL/Test.pm (renamed from test/testlib/OpenSSL/Test.pm)0
-rw-r--r--util/perl/OpenSSL/Test/Simple.pm (renamed from test/testlib/OpenSSL/Test/Simple.pm)0
-rw-r--r--util/perl/OpenSSL/Test/Utils.pm (renamed from test/testlib/OpenSSL/Test/Utils.pm)0
-rw-r--r--util/perl/TLSProxy/ClientHello.pm (renamed from util/TLSProxy/ClientHello.pm)0
-rw-r--r--util/perl/TLSProxy/Message.pm (renamed from util/TLSProxy/Message.pm)0
-rw-r--r--util/perl/TLSProxy/NewSessionTicket.pm (renamed from util/TLSProxy/NewSessionTicket.pm)0
-rw-r--r--util/perl/TLSProxy/Proxy.pm (renamed from util/TLSProxy/Proxy.pm)0
-rw-r--r--util/perl/TLSProxy/Record.pm (renamed from util/TLSProxy/Record.pm)0
-rw-r--r--util/perl/TLSProxy/ServerHello.pm (renamed from util/TLSProxy/ServerHello.pm)0
-rw-r--r--util/perl/TLSProxy/ServerKeyExchange.pm (renamed from util/TLSProxy/ServerKeyExchange.pm)0
-rw-r--r--util/perl/with_fallback.pm (renamed from util/with_fallback.pm)3
-rwxr-xr-xutil/process_docs.pl2
20 files changed, 17 insertions, 14 deletions
diff --git a/Configure b/Configure
index 5b235fe39e..3d4b2cd347 100755
--- a/Configure
+++ b/Configure
@@ -12,7 +12,7 @@
use 5.10.0;
use strict;
use FindBin;
-use lib "$FindBin::Bin/util";
+use lib "$FindBin::Bin/util/perl";
use File::Basename;
use File::Spec::Functions qw/:DEFAULT abs2rel rel2abs/;
use File::Path qw/mkpath/;
@@ -1481,7 +1481,7 @@ if ($builder eq "unified") {
my $template =
Text::Template->new(TYPE => 'FILE',
SOURCE => catfile($sourced, $f),
- PREPEND => qq{use lib "$FindBin::Bin/util";});
+ PREPEND => qq{use lib "$FindBin::Bin/util/perl";});
die "Something went wrong with $sourced/$f: $!\n" unless $template;
my @text =
split /^/m,
diff --git a/test/generate_ssl_tests.pl b/test/generate_ssl_tests.pl
index fd785b7bc6..47a328c80d 100644
--- a/test/generate_ssl_tests.pl
+++ b/test/generate_ssl_tests.pl
@@ -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);
diff --git a/test/recipes/80-test_ssl_new.t b/test/recipes/80-test_ssl_new.t
index 6f22a5aa35..287defe5c7 100644
--- a/test/recipes/80-test_ssl_new.t
+++ b/test/recipes/80-test_ssl_new.t
@@ -101,7 +101,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.");
diff --git a/test/recipes/tconversion.pl b/test/recipes/tconversion.pl
index e471160619..1cf68dc09b 100644
--- a/test/recipes/tconversion.pl
+++ b/test/recipes/tconversion.pl
@@ -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 = (
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 1859e605b4..77dffb332b 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -17,7 +17,7 @@ BEGIN {
use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
use File::Basename;
use FindBin;
-use lib "$FindBin::Bin/../util";
+use lib "$FindBin::Bin/../util/perl";
use OpenSSL::Glob;
use Module::Load::Conditional qw(can_load);
@@ -27,12 +27,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
);
diff --git a/util/dofile.pl b/util/dofile.pl
index 8b0c7b41c0..f561e6f9a8 100644
--- a/util/dofile.pl
+++ b/util/dofile.pl
@@ -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();
diff --git a/util/mkdef.pl b/util/mkdef.pl
index ce969db283..779503ce37 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -50,7 +50,7 @@ use configdata;
use File::Spec::Functions;
use File::Basename;
use FindBin;
-use lib "$FindBin::Bin";
+use lib "$FindBin::Bin/perl";
use OpenSSL::Glob;
my $debug=0;
diff --git a/util/OpenSSL/Glob.pm b/util/perl/OpenSSL/Glob.pm
index ec87da4aea..ec87da4aea 100644
--- a/util/OpenSSL/Glob.pm
+++ b/util/perl/OpenSSL/Glob.pm
diff --git a/test/testlib/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm
index f8805a6db0..f8805a6db0 100644
--- a/test/testlib/OpenSSL/Test.pm
+++ b/util/perl/OpenSSL/Test.pm
diff --git a/test/testlib/OpenSSL/Test/Simple.pm b/util/perl/OpenSSL/Test/Simple.pm
index c5a84d5ca3..c5a84d5ca3 100644
--- a/test/testlib/OpenSSL/Test/Simple.pm
+++ b/util/perl/OpenSSL/Test/Simple.pm
diff --git a/test/testlib/OpenSSL/Test/Utils.pm b/util/perl/OpenSSL/Test/Utils.pm
index 7b0a705636..7b0a705636 100644
--- a/test/testlib/OpenSSL/Test/Utils.pm
+++ b/util/perl/OpenSSL/Test/Utils.pm
diff --git a/util/TLSProxy/ClientHello.pm b/util/perl/TLSProxy/ClientHello.pm
index ec739d2970..ec739d2970 100644
--- a/util/TLSProxy/ClientHello.pm
+++ b/util/perl/TLSProxy/ClientHello.pm
diff --git a/util/TLSProxy/Message.pm b/util/perl/TLSProxy/Message.pm
index 0821bdedd3..0821bdedd3 100644
--- a/util/TLSProxy/Message.pm
+++ b/util/perl/TLSProxy/Message.pm
diff --git a/util/TLSProxy/NewSessionTicket.pm b/util/perl/TLSProxy/NewSessionTicket.pm
index e5099851d5..e5099851d5 100644
--- a/util/TLSProxy/NewSessionTicket.pm
+++ b/util/perl/TLSProxy/NewSessionTicket.pm
diff --git a/util/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm
index 8742ac7a9d..8742ac7a9d 100644
--- a/util/TLSProxy/Proxy.pm
+++ b/util/perl/TLSProxy/Proxy.pm
diff --git a/util/TLSProxy/Record.pm b/util/perl/TLSProxy/Record.pm
index a75d8cdfbd..a75d8cdfbd 100644
--- a/util/TLSProxy/Record.pm
+++ b/util/perl/TLSProxy/Record.pm
diff --git a/util/TLSProxy/ServerHello.pm b/util/perl/TLSProxy/ServerHello.pm
index 79a8be9a89..79a8be9a89 100644
--- a/util/TLSProxy/ServerHello.pm
+++ b/util/perl/TLSProxy/ServerHello.pm
diff --git a/util/TLSProxy/ServerKeyExchange.pm b/util/perl/TLSProxy/ServerKeyExchange.pm
index 6e5b4cdcb4..6e5b4cdcb4 100644
--- a/util/TLSProxy/ServerKeyExchange.pm
+++ b/util/perl/TLSProxy/ServerKeyExchange.pm
diff --git a/util/with_fallback.pm b/util/perl/with_fallback.pm
index b6deb2092e..2af1d5fbd5 100644
--- a/util/with_fallback.pm
+++ b/util/perl/with_fallback.pm
@@ -13,7 +13,8 @@ sub import {
foreach (@_) {
eval "require $_";
if ($@) {
- unshift @INC, catdir(dirname(__FILE__), "..", "external", "perl");
+ unshift @INC, catdir(dirname(__FILE__),
+ "..", "..", "external", "perl");
my $transfer = "transfer::$_";
eval "require $transfer";
shift @INC;
diff --git a/util/process_docs.pl b/util/process_docs.pl
index 38c2f3f219..e084df78a5 100755
--- a/util/process_docs.pl
+++ b/util/process_docs.pl
@@ -14,7 +14,7 @@ use File::Basename;
use File::Copy;
use File::Path;
use FindBin;
-use lib "$FindBin::Bin";
+use lib "$FindBin::Bin/perl";
use OpenSSL::Glob;
use Getopt::Long;
use Pod::Usage;