Skip to content

Commit

Permalink
Fix running tests with Perl on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex committed Dec 7, 2023
1 parent 8af227c commit b58fe4a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions configdata.pm.in
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ unless (caller) {
use File::Copy;
use Pod::Usage;

use lib '{- sourcedir('util', 'perl') -}';
use OpenSSL::fallback '{- sourcefile('external', 'perl', 'MODULES.txt') -}';
use lib;
use OpenSSL::fallback;

my $here = dirname($0);

Expand Down
4 changes: 3 additions & 1 deletion test/run_tests.pl
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,11 @@ sub find_matching_tests {
return bless { %args }, $class;
}

sub runtests {
sub runtests {
my $self = shift;

print $self

# Pre TAP::Harness Test::Harness doesn't support [ filename, name ]
# elements, so convert such elements to just be the filename
my @args = map { ref($_) eq 'ARRAY' ? $_->[0] : $_ } @_;
Expand Down
7 changes: 1 addition & 6 deletions util/wrap.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ use File::Spec::Functions;
BEGIN {
# This method corresponds exactly to 'use OpenSSL::Util',
# but allows us to use a platform specific file spec.
require {-
use Cwd qw(abs_path);

"'" . abs_path(catfile($config{sourcedir},
'util', 'perl', 'OpenSSL', 'Util.pm')) . "'";
-};
require "$ENV{SRCTOP}/util/perl/OpenSSL/Util.pm";
OpenSSL::Util->import();
}

Expand Down

0 comments on commit b58fe4a

Please sign in to comment.