diff options
author | Andy Polyakov <appro@openssl.org> | 2016-05-28 16:11:01 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-05-29 14:12:35 +0200 |
commit | 97855556161155d87635787aca341a6a86b2f9e4 (patch) | |
tree | 411770007dc49579d4edc0fb890d86f187633b09 /test/recipes | |
parent | f59f23c38331e3adf58c0317caf319a7bfd82dd1 (diff) |
Configure,test/recipes: "pin" glob to File::Glob::glob.
As it turns out default glob's behaviour for quoted argument varies
from version to version, making it impossible to Configure or run
tests in some cases. The reason for quoting globs was to accommodate
source path with spaces in its name, which was treated by default glob
as multiple paths. File::Glob::glob on the other hand doesn't consider
spaces as delimiters and therefore works with unquoted patterns.
[Unfortunaltely File::Glob::glob, being too csh-ly, doesn't work
on VMS, hence the "pinning" is conditional.]
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/recipes')
-rw-r--r-- | test/recipes/40-test_rehash.t | 9 | ||||
-rw-r--r-- | test/recipes/80-test_ssl_new.t | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t index c5c90e0bd6..201d1add13 100644 --- a/test/recipes/40-test_rehash.t +++ b/test/recipes/40-test_rehash.t @@ -13,6 +13,9 @@ use warnings; use File::Spec::Functions; use File::Copy; use File::Basename; +if ($^O ne "VMS") { + use File::Glob qw/glob/; +} use OpenSSL::Test qw/:DEFAULT bldtop_file/; setup("test_rehash"); @@ -59,9 +62,9 @@ indir "rehash.$$" => sub { sub prepare { my @sourcefiles = sort map { glob(bldtop_file('certs', 'demo', "*.$_")) } ('pem', - 'crt', - 'cer', - 'crl'); + 'crt', + 'cer', + 'crl'); my @destfiles = (); foreach (@sourcefiles) { copy($_, curdir()); diff --git a/test/recipes/80-test_ssl_new.t b/test/recipes/80-test_ssl_new.t index 07f1291f69..b9f3fa8e8d 100644 --- a/test/recipes/80-test_ssl_new.t +++ b/test/recipes/80-test_ssl_new.t @@ -12,6 +12,9 @@ use warnings; use File::Basename; use File::Compare qw/compare_text/; +if ($^O ne "VMS") { + use File::Glob qw/glob/; +} use OpenSSL::Test qw/:DEFAULT srctop_dir srctop_file/; use OpenSSL::Test::Utils qw/disabled alldisabled available_protocols/; @@ -20,7 +23,7 @@ setup("test_ssl_new"); $ENV{TEST_CERTS_DIR} = srctop_dir("test", "certs"); -my @conf_srcs = glob('"'.srctop_file("test", "ssl-tests", "*.conf.in").'"'); +my @conf_srcs = glob(srctop_file("test", "ssl-tests", "*.conf.in")); map { s/;.*// } @conf_srcs if $^O eq "VMS"; my @conf_files = map { basename($_) } @conf_srcs; map { s/\.in// } @conf_files; |