Commit 470a6017 authored by Richard Levitte's avatar Richard Levitte
Browse files

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: default avatarAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4667)
parent b81cfa07
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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.");

+0 −1
Original line number Diff line number Diff line
@@ -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 = (
+3 −4
Original line number Diff line number Diff line
@@ -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
    );
Loading