diff options
author | Richard Levitte <levitte@openssl.org> | 2019-09-09 11:51:01 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-09-12 12:49:31 +0200 |
commit | 1935a5861c7e4bc1e0a4434800896a2dbd834ae4 (patch) | |
tree | 6419cf2764c32889996d4c20f276c21e5f4b815e /test/generate_ssl_tests.pl | |
parent | 7eeceeaab24aea16027cdc1f9df92366094893b7 (diff) |
Rework the perl fallback functionality
The module with_fallback.pm was kind of clunky and required a transfer
module. This change replaces if with a much more generic pragma type
module, which simply appends given directories to @INC (as opposed to
the 'lib' pragma, which prepends the directories to @INC).
This also supports having a file MODULES.txt with sub-directories to
modules. This ensures that we don't have to spray individual module
paths throughout our perl code, but can have them collected in one
place.
(do note that there is a 'fallback' module on CPAN. However, it isn't
part of the core perl, and it has no support the any MODULES.txt kind
of construct)
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9826)
Diffstat (limited to 'test/generate_ssl_tests.pl')
-rw-r--r-- | test/generate_ssl_tests.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/generate_ssl_tests.pl b/test/generate_ssl_tests.pl index 57227eb72d..044dff6ad4 100644 --- a/test/generate_ssl_tests.pl +++ b/test/generate_ssl_tests.pl @@ -22,10 +22,12 @@ BEGIN { OpenSSL::Test::setup("no_test_here"); } -use lib srctop_dir("util", "perl"); # for with_fallback -use lib srctop_dir("test", "ssl-tests"); # for ssltests_base +use FindBin; +use lib "$FindBin::Bin/../util/perl"; +use OpenSSL::fallback "$FindBin::Bin/../external/perl/MODULES.txt"; +use Text::Template 1.46; -use with_fallback qw(Text::Template); +use lib "$FindBin::Bin/ssl-tests"; use vars qw/@ISA/; push (@ISA, qw/Text::Template/); |