summaryrefslogtreecommitdiffstats
path: root/test/run_tests.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2016-05-28 16:11:01 +0200
committerAndy Polyakov <appro@openssl.org>2016-05-29 14:12:35 +0200
commit97855556161155d87635787aca341a6a86b2f9e4 (patch)
tree411770007dc49579d4edc0fb890d86f187633b09 /test/run_tests.pl
parentf59f23c38331e3adf58c0317caf319a7bfd82dd1 (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/run_tests.pl')
-rw-r--r--test/run_tests.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/run_tests.pl b/test/run_tests.pl
index 6ce1521a75..b1084138dd 100644
--- a/test/run_tests.pl
+++ b/test/run_tests.pl
@@ -16,6 +16,9 @@ BEGIN {
use File::Spec::Functions qw/catdir catfile curdir abs2rel rel2abs/;
use File::Basename;
+if ($^O ne "VMS") {
+ use File::Glob qw/glob/;
+}
use Test::Harness qw/runtests $switches/;
my $srctop = $ENV{SRCTOP} || $ENV{TOP};
@@ -42,13 +45,13 @@ my $list_mode = scalar(grep /^list$/, @tests) != 0;
if (grep /^(alltests|list)$/, @tests) {
@tests = grep {
basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
- } glob('"'.catfile($recipesdir,"*.t").'"');
+ } glob(catfile($recipesdir,"*.t"));
} else {
my @t = ();
foreach (@tests) {
push @t, grep {
basename($_) =~ /^[0-9][0-9]-[^\.]*\.t$/
- } glob('"'.catfile($recipesdir,"*-$_.t").'"');
+ } glob(catfile($recipesdir,"*-$_.t"));
}
@tests = @t;
}