summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure9
-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.pl5
-rw-r--r--util/dofile.pl8
-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/Certificate.pm (renamed from util/TLSProxy/Certificate.pm)0
-rw-r--r--util/perl/TLSProxy/CertificateVerify.pm (renamed from util/TLSProxy/CertificateVerify.pm)0
-rw-r--r--util/perl/TLSProxy/ClientHello.pm (renamed from util/TLSProxy/ClientHello.pm)0
-rw-r--r--util/perl/TLSProxy/EncryptedExtensions.pm (renamed from util/TLSProxy/EncryptedExtensions.pm)0
-rw-r--r--util/perl/TLSProxy/HelloRetryRequest.pm (renamed from util/TLSProxy/HelloRetryRequest.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/checkhandshake.pm (renamed from test/testlib/checkhandshake.pm)0
-rw-r--r--util/perl/with_fallback.pm (renamed from util/with_fallback.pm)3
22 files changed, 18 insertions, 12 deletions
diff --git a/Configure b/Configure
index 61b86c4921..ada1472b24 100755
--- a/Configure
+++ b/Configure
@@ -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,
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 de351903a5..f86e50988e 100644
--- a/test/recipes/80-test_ssl_new.t
+++ b/test/recipes/80-test_ssl_new.t
@@ -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.");
diff --git a/test/recipes/tconversion.pl b/test/recipes/tconversion.pl
index 1a308e20b8..fb0b766ce7 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 1695729e81..1171eec2f7 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -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
);
diff --git a/util/dofile.pl b/util/dofile.pl
index 0d05574667..36827e350a 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/test/testlib/OpenSSL/Test.pm b/util/perl/OpenSSL/Test.pm
index f8fcbe906d..f8fcbe906d 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 665bfc6310..665bfc6310 100644
--- a/test/testlib/OpenSSL/Test/Utils.pm
+++ b/util/perl/OpenSSL/Test/Utils.pm
diff --git a/util/TLSProxy/Certificate.pm b/util/perl/TLSProxy/Certificate.pm
index d3bf7f2180..d3bf7f2180 100644
--- a/util/TLSProxy/Certificate.pm
+++ b/util/perl/TLSProxy/Certificate.pm
diff --git a/util/TLSProxy/CertificateVerify.pm b/util/perl/TLSProxy/CertificateVerify.pm
index 8bf969fba1..8bf969fba1 100644
--- a/util/TLSProxy/CertificateVerify.pm
+++ b/util/perl/TLSProxy/CertificateVerify.pm
diff --git a/util/TLSProxy/ClientHello.pm b/util/perl/TLSProxy/ClientHello.pm
index 2ae9d6f55d..2ae9d6f55d 100644
--- a/util/TLSProxy/ClientHello.pm
+++ b/util/perl/TLSProxy/ClientHello.pm
diff --git a/util/TLSProxy/EncryptedExtensions.pm b/util/perl/TLSProxy/EncryptedExtensions.pm
index 81242e29ff..81242e29ff 100644
--- a/util/TLSProxy/EncryptedExtensions.pm
+++ b/util/perl/TLSProxy/EncryptedExtensions.pm
diff --git a/util/TLSProxy/HelloRetryRequest.pm b/util/perl/TLSProxy/HelloRetryRequest.pm
index c4125b7a16..c4125b7a16 100644
--- a/util/TLSProxy/HelloRetryRequest.pm
+++ b/util/perl/TLSProxy/HelloRetryRequest.pm
diff --git a/util/TLSProxy/Message.pm b/util/perl/TLSProxy/Message.pm
index a9002ec654..a9002ec654 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 c92652e78f..c92652e78f 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 5017c9094c..5017c9094c 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 1abdd053e1..1abdd053e1 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 cb4cc7c762..cb4cc7c762 100644
--- a/util/TLSProxy/ServerKeyExchange.pm
+++ b/util/perl/TLSProxy/ServerKeyExchange.pm
diff --git a/test/testlib/checkhandshake.pm b/util/perl/checkhandshake.pm
index 65c5135a1e..65c5135a1e 100644
--- a/test/testlib/checkhandshake.pm
+++ b/util/perl/checkhandshake.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;