Fix rpath-related Linux "test_shlibload" failure.
[openssl.git] / test / run_tests.pl
index 1171eec2f75ed1280018b5ffa057174a95946990..881feaec712d1d37358d2946ff09e10e79e14b38 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/env perl
-# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
 #
 # Licensed under the OpenSSL license (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
@@ -16,17 +16,20 @@ BEGIN {
 
 use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
 use File::Basename;
-use if $^O ne "VMS", 'File::Glob' => qw/:bsd_glob/;
-use Module::Load::Conditional qw(can_load);
+use FindBin;
+use lib "$FindBin::Bin/../util/perl";
+use OpenSSL::Glob;
 
-my $TAP_Harness = can_load(modules => { 'TAP::Harness' => undef }) 
-    ? 'TAP::Harness' : 'OpenSSL::TAP::Harness';
+my $TAP_Harness = eval { require TAP::Harness } ? "TAP::Harness"
+                                                : "OpenSSL::TAP::Harness";
 
 my $srctop = $ENV{SRCTOP} || $ENV{TOP};
 my $bldtop = $ENV{BLDTOP} || $ENV{TOP};
 my $recipesdir = catdir($srctop, "test", "recipes");
 my $libdir = rel2abs(catdir($srctop, "util", "perl"));
 
+$ENV{OPENSSL_CONF} = catdir($srctop, "apps", "openssl.cnf");
+
 my %tapargs =
     ( verbosity => $ENV{VERBOSE} || $ENV{V} || $ENV{HARNESS_VERBOSE} ? 1 : 0,
       lib       => [ $libdir ],