Tony Cook
2015-01-06 00:38:35 UTC
In perl.git, the branch blead has been updated
<http://perl5.git.perl.org/perl.git/commitdiff/93503762a3ac8a81eb76c0de14dcd915534751a0?hp=216b3a07e3859be14fc65f24014d7895e53fb6aa>
- Log -----------------------------------------------------------------
commit 93503762a3ac8a81eb76c0de14dcd915534751a0
Merge: 216b3a0 bfe029f
Author: Tony Cook <***@develop-help.com>
Date: Tue Jan 6 11:24:53 2015 +1100
make minitest (mostly) work on Win32
The only test left failing is op/glob.t, since I couldn't find the
cause of the failure
commit bfe029f3edb024596c473b4f8d0800d3f543df37
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 9 15:13:04 2014 +1100
minitest: run the sames tests on win32 as on POSIXish systems
M win32/Makefile
M win32/makefile.mk
commit a64c093f81b2020087bd2a8ccb9f74a862ec194f
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 9 15:06:05 2014 +1100
minitest: miniperl on win32 always displays the x86 arch, so skip testing it
M t/run/switches.t
commit 1eea96ba8514738ce13016110ff0c48d06bc862f
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 9 14:38:38 2014 +1100
minitest op/magic.t: skip the env_is() tests on Win32 miniperl
Since 1070c8d6 env_is() requires the Win32 module on Win32, which
miniperl can't load
M t/op/magic.t
commit 0121121b640438a121775b73a62536967d7dcc5b
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 15:11:29 2014 +1100
Win32 minitest: -k is never available on Win32
Given the structure of the tests and the code, I can only assume
S_ISVTX is only unavailable on Win32 out of the systems we run
minitest on.
M t/op/filetest.t
commit 482e515e84e1dd6f674e6d3bfd647e838fa274aa
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 13:27:35 2014 +1100
miniperl on Win32 doesn't have fork()
M t/op/fork.t
commit 744168032b610d922e046e3a95ca5043cf998ad7
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 12:56:07 2014 +1100
some socket functions aren't available under Win32 miniperl
This only skips for bind, connect, accept() and select().
Other functions are tested in coreamp.t, but either aren't called with
valid handles, so don't reach the "unimplemented" errors, or don't
trigger the errors for other reasons.
fixes: op/coreamp.t, op/sselect.t, op/tie_fetch_count.t
M t/op/coreamp.t
M t/op/sselect.t
M t/op/tie_fetch_count.t
commit f0c73bbb72a79f60258c33d4a8e0f3cd5c71d814
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 11:44:52 2014 +1100
disable Win32 sloppy stat in io/fs.t, io/stat.t
8ce7a7e8b08f added a line to write_buildcustomize.pl to enable
${^WIN32_SLOPPY_STAT} in lib/buildcustomize.pl on Win32.
This meant the nlink value from stat wasn't being populated correctly
causing the link count tests to fail
M t/io/fs.t
M t/op/stat.t
commit ead233d2c1be4b0cd47d5fc22abe6e243f823675
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 16 17:05:18 2014 +1100
use textmode when opening scripts in miniperl to match perl
fixes io/data.t
This could be considered a bug in io/data.t, since it writes the scripts
in text mode, but making miniperl behave closer to perl may fix
other issues too.
M win32/win32.h
commit e5fb2b49c0e09d255ed30c17281313f00a79cbab
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 16 17:04:09 2014 +1100
build miniperl with PerlIO
Several tests use PerlIO layers (:utf8, :pop) without testing for it.
non-PerlIO builds were vaguely deprecated in 5.18.0 and can no longer be
enabled on POSIX systems through Configure, so making miniperl PerlIO
on Win32 is no big stretch
minitests failing now:
io/data.t
io/fs.t
op/coreamp.t
op/filetest.t
op/fork.t
op/glob.t
op/heredoc.t
op/magic.t
op/sselect.t
op/stat.t
op/tie_fetch_count.t
M win32/win32.h
commit 70a78ba74c408e393934cf301faba17862fdbb7d
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 11:01:34 2014 +1100
t/TEST: glob the supplied filenames on Win32
since Win32 perl doesn't glob by default
at this point the following tests fail:
io/dup.t
io/fs.t
io/open.t
io/perlio_leaks.t
op/coreamp.t
op/filetest.t
op/fork.t
op/fresh_perl_utf8.t
op/glob.t
op/heredoc.t
op/magic.t
op/read.t
op/readline.t
op/sselect.t
op/stat.t
op/substr.t
op/tie_fetch_count.t
op/write.t
M t/TEST
commit 11fbb0483cbc270c7e9296703ee04bba03a3e00a
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 10:48:32 2014 +1100
use TEST for minitest, same as POSIX systems
Test::Harness now requires IO at all times, which means it can't
be used with miniperl
many tests fail with minitest at this point
M win32/Makefile
M win32/makefile.mk
-----------------------------------------------------------------------
Summary of changes:
t/TEST | 5 +++-
t/io/fs.t | 6 +++++
t/op/coreamp.t | 69 ++++++++++++++++++++++++++++++++------------------
t/op/filetest.t | 15 ++++++++---
t/op/fork.t | 2 ++
t/op/magic.t | 4 ++-
t/op/sselect.t | 3 +++
t/op/stat.t | 5 ++++
t/op/tie_fetch_count.t | 3 +++
t/run/switches.t | 18 ++++++++-----
win32/Makefile | 2 +-
win32/makefile.mk | 2 +-
win32/win32.h | 4 +++
13 files changed, 99 insertions(+), 39 deletions(-)
diff --git a/t/TEST b/t/TEST
index 7c26372..4333eed 100755
--- a/t/TEST
+++ b/t/TEST
@@ -123,6 +123,9 @@ $| = 1;
# remove empty elements due to insertion of empty symbols via "''p1'" syntax
@ARGV = grep($_,@ARGV) if $^O eq 'VMS';
+
+@ARGV = map glob, @ARGV if $^O eq 'MSWin32';
+
our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0;
# Cheesy version of Getopt::Std. We can't replace it with that, because we
@@ -220,7 +223,7 @@ sub _scan_test {
close $script;
- my $perl = './perl';
+ my $perl = $^O eq 'MSWin32' ? '.\perl' : './perl';
my $lib = '../lib';
my $run_dir;
my $return_dir;
diff --git a/t/io/fs.t b/t/io/fs.t
index 9b41e65..6719a0a 100644
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -10,6 +10,12 @@ use Config;
my $Is_VMSish = ($^O eq 'VMS');
+if ($^O eq 'MSWin32') {
+ # under minitest, buildcustomize sets this to 1, which means
+ # nlinks isn't populated properly, allow our tests to pass
+ ${^WIN32_SLOPPY_STAT} = 0;
+}
+
if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) {
$wd = `cd`;
}
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 9a9ab48..9005306 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -276,32 +276,45 @@ is __SUB__test, \&__SUB__test, '&__SUB__'; ++ $tests;
test_proto 'abs', -5, 5;
-test_proto 'accept';
-$tests += 6; eval q{
- is &CORE::accept(qw{foo bar}), undef, "&accept";
- lis [&{"CORE::accept"}(qw{foo bar})], [undef], "&accept in list context";
-
- &myaccept(my $foo, my $bar);
- is ref $foo, 'GLOB', 'CORE::accept autovivifies its first argument';
- is $bar, undef, 'CORE::accept does not autovivify its second argument';
- use strict;
- undef $foo;
- eval { 'myaccept'->($foo, $bar) };
- like $@, qr/^Can't use an undefined value as a symbol reference at/,
+SKIP:
+{
+ if ($^O eq "MSWin32" && is_miniperl) {
+ $tests += 8;
+ skip "accept() not available in Win32 miniperl", 8
+ }
+ $tests += 6;
+ test_proto 'accept';
+ eval q{
+ is &CORE::accept(qw{foo bar}), undef, "&accept";
+ lis [&{"CORE::accept"}(qw{foo bar})], [undef], "&accept in list context";
+
+ &myaccept(my $foo, my $bar);
+ is ref $foo, 'GLOB', 'CORE::accept autovivifies its first argument';
+ is $bar, undef, 'CORE::accept does not autovivify its second argument';
+ use strict;
+ undef $foo;
+ eval { 'myaccept'->($foo, $bar) };
+ like $@, qr/^Can't use an undefined value as a symbol reference at/,
'CORE::accept will not accept undef 2nd arg under strict';
- is ref $foo, 'GLOB', 'CORE::accept autovivs its first arg under strict';
-};
+ is ref $foo, 'GLOB', 'CORE::accept autovivs its first arg under strict';
+ };
+}
test_proto 'alarm';
test_proto 'atan2';
test_proto 'bind';
$tests += 3;
-is &CORE::bind('foo', 'bear'), undef, "&bind";
-lis [&CORE::bind('foo', 'bear')], [undef], "&bind in list context";
-eval { &mybind(my $foo, "bear") };
-like $@, qr/^Bad symbol for filehandle at/,
- 'CORE::bind dies with undef first arg';
+SKIP:
+{
+ skip "bind() not available in Win32 miniperl", 3
+ if $^O eq "MSWin32" && is_miniperl();
+ is &CORE::bind('foo', 'bear'), undef, "&bind";
+ lis [&CORE::bind('foo', 'bear')], [undef], "&bind in list context";
+ eval { &mybind(my $foo, "bear") };
+ like $@, qr/^Bad symbol for filehandle at/,
+ 'CORE::bind dies with undef first arg';
+}
test_proto 'binmode';
$tests += 3;
@@ -397,8 +410,13 @@ lis [&CORE::closedir(foo)], [undef], '&CORE::closedir in list context';
test_proto 'connect';
$tests += 2;
-is &CORE::connect('foo','bar'), undef, '&connect';
-lis [&myconnect('foo','bar')], [undef], '&connect in list context';
+SKIP:
+{
+ skip "connect() not available in Win32 miniperl", 2
+ if $^O eq "MSWin32" && is_miniperl();
+ is &CORE::connect('foo','bar'), undef, '&connect';
+ lis [&myconnect('foo','bar')], [undef], '&connect in list context';
+}
test_proto 'continue';
$tests ++;
@@ -781,9 +799,12 @@ like $@, qr/^Not enough arguments for select system call at /,
eval { &myselect(1,2,3,4,5) };
like $@, qr/^Too many arguments for select system call at /,
,'&myselect($a,$total,$of,$five,$args)';
-&myselect((undef)x3,.25);
-# Just have to assume that worked. :-) If we get here, at least it didnât
-# crash or anything.
+unless ($^O eq "MSWin32" && is_miniperl) {
+ &myselect((undef)x3,.25);
+ # Just have to assume that worked. :-) If we get here, at least it didnât
+ # crash or anything.
+ # select() is unimplemented in Win32 miniperl
+}
test_proto "sem$_" for qw "ctl get op";
diff --git a/t/op/filetest.t b/t/op/filetest.t
index 91ebe9c..8883381 100644
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -223,11 +223,18 @@ for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") {
my ($exp, $is) = (1, "is");
if (
- !$fcntl_not_available and (
- $op eq "u" and not eval { Fcntl::S_ISUID() } or
- $op eq "g" and not eval { Fcntl::S_ISGID() } or
- $op eq "k" and not eval { Fcntl::S_ISVTX() }
+ (
+ !$fcntl_not_available and
+ (
+ $op eq "u" and not eval { Fcntl::S_ISUID() } or
+ $op eq "g" and not eval { Fcntl::S_ISGID() } or
+ $op eq "k" and not eval { Fcntl::S_ISVTX() }
+ )
)
+ ||
+ # the Fcntl test is meaningless in miniperl and
+ # S_ISVTX isn't available on Win32
+ ( $^O eq 'MSWin32' && $op eq 'k' && is_miniperl )
) {
($exp, $is) = (0, "not");
}
diff --git a/t/op/fork.t b/t/op/fork.t
index 734e223..77cc7b7 100644
--- a/t/op/fork.t
+++ b/t/op/fork.t
@@ -9,6 +9,8 @@ BEGIN {
require Config;
skip_all('no fork')
unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
+ skip_all('no fork')
+ if $^O eq 'MSWin32' && is_miniperl;
}
$|=1;
diff --git a/t/op/magic.t b/t/op/magic.t
index bb9d175..3fbec7b 100644
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -684,8 +684,10 @@ is $_, undef, '${^E_NCODING} is undef';
# ^^^^^^^^^ New tests go here ^^^^^^^^^
SKIP: {
- skip("%ENV manipulations fail or aren't safe on $^O", 19)
+ skip("%ENV manipulations fail or aren't safe on $^O", 20)
if $Is_Dos;
+ skip "Win32 needs XS for env/shell tests", 20
+ if $Is_MSWin32 && is_miniperl;
SKIP: {
skip("clearing \%ENV is not safe when running under valgrind or on VMS")
diff --git a/t/op/sselect.t b/t/op/sselect.t
index d0dc33b..212c69a 100644
--- a/t/op/sselect.t
+++ b/t/op/sselect.t
@@ -9,6 +9,9 @@ BEGIN {
require './test.pl';
+skip_all("Win32 miniperl has no socket select")
+ if $^O eq "MSWin32" && is_miniperl();
+
plan (15);
my $blank = "";
diff --git a/t/op/stat.t b/t/op/stat.t
index 2c28e1e..1461b52 100644
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -19,6 +19,11 @@ if(eval {require File::Spec; 1}) {
diag("\ncontinuing, assuming '.' for current directory. Some tests will be skipped.");
}
+if ($^O eq 'MSWin32') {
+ # under minitest, buildcustomize sets this to 1, which means
+ # nlinks isn't populated properly, allow nlinks tests to pass
+ ${^WIN32_SLOPPY_STAT} = 0;
+}
plan tests => 113;
diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t
index 65e8be0..41fef0c 100644
--- a/t/op/tie_fetch_count.t
+++ b/t/op/tie_fetch_count.t
@@ -257,7 +257,10 @@ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
$var = substr(chr 256,0,0);
$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
+SKIP:
{
+ skip "select not implemented on Win32 miniperl", 3
+ if $^O eq "MSWin32" and is_miniperl;
no warnings;
$var = *foo;
$dummy = select $var, undef, undef, 0
diff --git a/t/run/switches.t b/t/run/switches.t
index 09b77c7..78915e0 100644
--- a/t/run/switches.t
+++ b/t/run/switches.t
@@ -298,13 +298,17 @@ is runperl(stderr => 1, prog => '#!perl -M'),
local $TODO = ''; # these ones should work on VMS
# there are definitely known build configs where this test will fail
# DG/UX comes to mind. Maybe we should remove these special cases?
- my $v = sprintf "%vd", $^V;
- my $ver = $Config{PERL_VERSION};
- my $rel = $Config{PERL_SUBVERSION};
- like( runperl( switches => ['-v'] ),
- qr/This is perl 5, version \Q$ver\E, subversion \Q$rel\E \(v\Q$v\E(?:[-*\w]+| \([^)]+\))?\) built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s,
- '-v looks okay' );
-
+ SKIP:
+ {
+ skip "Win32 miniperl produces a default archname in -v", 1
+ if $^O eq 'MSWin32' && is_miniperl;
+ my $v = sprintf "%vd", $^V;
+ my $ver = $Config{PERL_VERSION};
+ my $rel = $Config{PERL_SUBVERSION};
+ like( runperl( switches => ['-v'] ),
+ qr/This is perl 5, version \Q$ver\E, subversion \Q$rel\E \(v\Q$v\E(?:[-*\w]+| \([^)]+\))?\) built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License ... [3 chars truncated]
+ '-v looks okay' );
+ }
}
# Tests for -h
diff --git a/win32/Makefile b/win32/Makefile
index 8e700ab..3ca3376 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -1320,7 +1320,7 @@ minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
attrib -r ..\t\*.*
cd ..\t && \
# Note this perl.exe is miniperl
- perl.exe harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
+ perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
test-prep : all utils ../pod/perltoc.pod
$(XCOPY) $(PERLEXE) ..\t\$(NULL)
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 1c16dba..bfe5458 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1597,7 +1597,7 @@ minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
attrib -r ..\t\*.*
cd ..\t && \
# Note this perl.exe is miniperl
- perl.exe harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
+ perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
test-prep : all utils ..\pod\perltoc.pod
$(XCOPY) $(PERLEXE) ..\t\$(NULL)
diff --git a/win32/win32.h b/win32/win32.h
index 5a48b0b..5b70557 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -23,6 +23,10 @@
# define WIN32_NO_SOCKETS
/* less I/O calls during each require */
# define PERL_DISABLE_PMC
+
+/* allow minitest to work */
+# define USE_PERLIO
+# define PERL_TEXTMODE_SCRIPTS
#endif
#ifdef WIN32_NO_SOCKETS
--
Perl5 Master Repository
<http://perl5.git.perl.org/perl.git/commitdiff/93503762a3ac8a81eb76c0de14dcd915534751a0?hp=216b3a07e3859be14fc65f24014d7895e53fb6aa>
- Log -----------------------------------------------------------------
commit 93503762a3ac8a81eb76c0de14dcd915534751a0
Merge: 216b3a0 bfe029f
Author: Tony Cook <***@develop-help.com>
Date: Tue Jan 6 11:24:53 2015 +1100
make minitest (mostly) work on Win32
The only test left failing is op/glob.t, since I couldn't find the
cause of the failure
commit bfe029f3edb024596c473b4f8d0800d3f543df37
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 9 15:13:04 2014 +1100
minitest: run the sames tests on win32 as on POSIXish systems
M win32/Makefile
M win32/makefile.mk
commit a64c093f81b2020087bd2a8ccb9f74a862ec194f
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 9 15:06:05 2014 +1100
minitest: miniperl on win32 always displays the x86 arch, so skip testing it
M t/run/switches.t
commit 1eea96ba8514738ce13016110ff0c48d06bc862f
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 9 14:38:38 2014 +1100
minitest op/magic.t: skip the env_is() tests on Win32 miniperl
Since 1070c8d6 env_is() requires the Win32 module on Win32, which
miniperl can't load
M t/op/magic.t
commit 0121121b640438a121775b73a62536967d7dcc5b
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 15:11:29 2014 +1100
Win32 minitest: -k is never available on Win32
Given the structure of the tests and the code, I can only assume
S_ISVTX is only unavailable on Win32 out of the systems we run
minitest on.
M t/op/filetest.t
commit 482e515e84e1dd6f674e6d3bfd647e838fa274aa
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 13:27:35 2014 +1100
miniperl on Win32 doesn't have fork()
M t/op/fork.t
commit 744168032b610d922e046e3a95ca5043cf998ad7
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 12:56:07 2014 +1100
some socket functions aren't available under Win32 miniperl
This only skips for bind, connect, accept() and select().
Other functions are tested in coreamp.t, but either aren't called with
valid handles, so don't reach the "unimplemented" errors, or don't
trigger the errors for other reasons.
fixes: op/coreamp.t, op/sselect.t, op/tie_fetch_count.t
M t/op/coreamp.t
M t/op/sselect.t
M t/op/tie_fetch_count.t
commit f0c73bbb72a79f60258c33d4a8e0f3cd5c71d814
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 11:44:52 2014 +1100
disable Win32 sloppy stat in io/fs.t, io/stat.t
8ce7a7e8b08f added a line to write_buildcustomize.pl to enable
${^WIN32_SLOPPY_STAT} in lib/buildcustomize.pl on Win32.
This meant the nlink value from stat wasn't being populated correctly
causing the link count tests to fail
M t/io/fs.t
M t/op/stat.t
commit ead233d2c1be4b0cd47d5fc22abe6e243f823675
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 16 17:05:18 2014 +1100
use textmode when opening scripts in miniperl to match perl
fixes io/data.t
This could be considered a bug in io/data.t, since it writes the scripts
in text mode, but making miniperl behave closer to perl may fix
other issues too.
M win32/win32.h
commit e5fb2b49c0e09d255ed30c17281313f00a79cbab
Author: Tony Cook <***@develop-help.com>
Date: Tue Dec 16 17:04:09 2014 +1100
build miniperl with PerlIO
Several tests use PerlIO layers (:utf8, :pop) without testing for it.
non-PerlIO builds were vaguely deprecated in 5.18.0 and can no longer be
enabled on POSIX systems through Configure, so making miniperl PerlIO
on Win32 is no big stretch
minitests failing now:
io/data.t
io/fs.t
op/coreamp.t
op/filetest.t
op/fork.t
op/glob.t
op/heredoc.t
op/magic.t
op/sselect.t
op/stat.t
op/tie_fetch_count.t
M win32/win32.h
commit 70a78ba74c408e393934cf301faba17862fdbb7d
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 11:01:34 2014 +1100
t/TEST: glob the supplied filenames on Win32
since Win32 perl doesn't glob by default
at this point the following tests fail:
io/dup.t
io/fs.t
io/open.t
io/perlio_leaks.t
op/coreamp.t
op/filetest.t
op/fork.t
op/fresh_perl_utf8.t
op/glob.t
op/heredoc.t
op/magic.t
op/read.t
op/readline.t
op/sselect.t
op/stat.t
op/substr.t
op/tie_fetch_count.t
op/write.t
M t/TEST
commit 11fbb0483cbc270c7e9296703ee04bba03a3e00a
Author: Tony Cook <***@develop-help.com>
Date: Mon Dec 8 10:48:32 2014 +1100
use TEST for minitest, same as POSIX systems
Test::Harness now requires IO at all times, which means it can't
be used with miniperl
many tests fail with minitest at this point
M win32/Makefile
M win32/makefile.mk
-----------------------------------------------------------------------
Summary of changes:
t/TEST | 5 +++-
t/io/fs.t | 6 +++++
t/op/coreamp.t | 69 ++++++++++++++++++++++++++++++++------------------
t/op/filetest.t | 15 ++++++++---
t/op/fork.t | 2 ++
t/op/magic.t | 4 ++-
t/op/sselect.t | 3 +++
t/op/stat.t | 5 ++++
t/op/tie_fetch_count.t | 3 +++
t/run/switches.t | 18 ++++++++-----
win32/Makefile | 2 +-
win32/makefile.mk | 2 +-
win32/win32.h | 4 +++
13 files changed, 99 insertions(+), 39 deletions(-)
diff --git a/t/TEST b/t/TEST
index 7c26372..4333eed 100755
--- a/t/TEST
+++ b/t/TEST
@@ -123,6 +123,9 @@ $| = 1;
# remove empty elements due to insertion of empty symbols via "''p1'" syntax
@ARGV = grep($_,@ARGV) if $^O eq 'VMS';
+
+@ARGV = map glob, @ARGV if $^O eq 'MSWin32';
+
our $show_elapsed_time = $ENV{HARNESS_TIMER} || 0;
# Cheesy version of Getopt::Std. We can't replace it with that, because we
@@ -220,7 +223,7 @@ sub _scan_test {
close $script;
- my $perl = './perl';
+ my $perl = $^O eq 'MSWin32' ? '.\perl' : './perl';
my $lib = '../lib';
my $run_dir;
my $return_dir;
diff --git a/t/io/fs.t b/t/io/fs.t
index 9b41e65..6719a0a 100644
--- a/t/io/fs.t
+++ b/t/io/fs.t
@@ -10,6 +10,12 @@ use Config;
my $Is_VMSish = ($^O eq 'VMS');
+if ($^O eq 'MSWin32') {
+ # under minitest, buildcustomize sets this to 1, which means
+ # nlinks isn't populated properly, allow our tests to pass
+ ${^WIN32_SLOPPY_STAT} = 0;
+}
+
if (($^O eq 'MSWin32') || ($^O eq 'NetWare')) {
$wd = `cd`;
}
diff --git a/t/op/coreamp.t b/t/op/coreamp.t
index 9a9ab48..9005306 100644
--- a/t/op/coreamp.t
+++ b/t/op/coreamp.t
@@ -276,32 +276,45 @@ is __SUB__test, \&__SUB__test, '&__SUB__'; ++ $tests;
test_proto 'abs', -5, 5;
-test_proto 'accept';
-$tests += 6; eval q{
- is &CORE::accept(qw{foo bar}), undef, "&accept";
- lis [&{"CORE::accept"}(qw{foo bar})], [undef], "&accept in list context";
-
- &myaccept(my $foo, my $bar);
- is ref $foo, 'GLOB', 'CORE::accept autovivifies its first argument';
- is $bar, undef, 'CORE::accept does not autovivify its second argument';
- use strict;
- undef $foo;
- eval { 'myaccept'->($foo, $bar) };
- like $@, qr/^Can't use an undefined value as a symbol reference at/,
+SKIP:
+{
+ if ($^O eq "MSWin32" && is_miniperl) {
+ $tests += 8;
+ skip "accept() not available in Win32 miniperl", 8
+ }
+ $tests += 6;
+ test_proto 'accept';
+ eval q{
+ is &CORE::accept(qw{foo bar}), undef, "&accept";
+ lis [&{"CORE::accept"}(qw{foo bar})], [undef], "&accept in list context";
+
+ &myaccept(my $foo, my $bar);
+ is ref $foo, 'GLOB', 'CORE::accept autovivifies its first argument';
+ is $bar, undef, 'CORE::accept does not autovivify its second argument';
+ use strict;
+ undef $foo;
+ eval { 'myaccept'->($foo, $bar) };
+ like $@, qr/^Can't use an undefined value as a symbol reference at/,
'CORE::accept will not accept undef 2nd arg under strict';
- is ref $foo, 'GLOB', 'CORE::accept autovivs its first arg under strict';
-};
+ is ref $foo, 'GLOB', 'CORE::accept autovivs its first arg under strict';
+ };
+}
test_proto 'alarm';
test_proto 'atan2';
test_proto 'bind';
$tests += 3;
-is &CORE::bind('foo', 'bear'), undef, "&bind";
-lis [&CORE::bind('foo', 'bear')], [undef], "&bind in list context";
-eval { &mybind(my $foo, "bear") };
-like $@, qr/^Bad symbol for filehandle at/,
- 'CORE::bind dies with undef first arg';
+SKIP:
+{
+ skip "bind() not available in Win32 miniperl", 3
+ if $^O eq "MSWin32" && is_miniperl();
+ is &CORE::bind('foo', 'bear'), undef, "&bind";
+ lis [&CORE::bind('foo', 'bear')], [undef], "&bind in list context";
+ eval { &mybind(my $foo, "bear") };
+ like $@, qr/^Bad symbol for filehandle at/,
+ 'CORE::bind dies with undef first arg';
+}
test_proto 'binmode';
$tests += 3;
@@ -397,8 +410,13 @@ lis [&CORE::closedir(foo)], [undef], '&CORE::closedir in list context';
test_proto 'connect';
$tests += 2;
-is &CORE::connect('foo','bar'), undef, '&connect';
-lis [&myconnect('foo','bar')], [undef], '&connect in list context';
+SKIP:
+{
+ skip "connect() not available in Win32 miniperl", 2
+ if $^O eq "MSWin32" && is_miniperl();
+ is &CORE::connect('foo','bar'), undef, '&connect';
+ lis [&myconnect('foo','bar')], [undef], '&connect in list context';
+}
test_proto 'continue';
$tests ++;
@@ -781,9 +799,12 @@ like $@, qr/^Not enough arguments for select system call at /,
eval { &myselect(1,2,3,4,5) };
like $@, qr/^Too many arguments for select system call at /,
,'&myselect($a,$total,$of,$five,$args)';
-&myselect((undef)x3,.25);
-# Just have to assume that worked. :-) If we get here, at least it didnât
-# crash or anything.
+unless ($^O eq "MSWin32" && is_miniperl) {
+ &myselect((undef)x3,.25);
+ # Just have to assume that worked. :-) If we get here, at least it didnât
+ # crash or anything.
+ # select() is unimplemented in Win32 miniperl
+}
test_proto "sem$_" for qw "ctl get op";
diff --git a/t/op/filetest.t b/t/op/filetest.t
index 91ebe9c..8883381 100644
--- a/t/op/filetest.t
+++ b/t/op/filetest.t
@@ -223,11 +223,18 @@ for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") {
my ($exp, $is) = (1, "is");
if (
- !$fcntl_not_available and (
- $op eq "u" and not eval { Fcntl::S_ISUID() } or
- $op eq "g" and not eval { Fcntl::S_ISGID() } or
- $op eq "k" and not eval { Fcntl::S_ISVTX() }
+ (
+ !$fcntl_not_available and
+ (
+ $op eq "u" and not eval { Fcntl::S_ISUID() } or
+ $op eq "g" and not eval { Fcntl::S_ISGID() } or
+ $op eq "k" and not eval { Fcntl::S_ISVTX() }
+ )
)
+ ||
+ # the Fcntl test is meaningless in miniperl and
+ # S_ISVTX isn't available on Win32
+ ( $^O eq 'MSWin32' && $op eq 'k' && is_miniperl )
) {
($exp, $is) = (0, "not");
}
diff --git a/t/op/fork.t b/t/op/fork.t
index 734e223..77cc7b7 100644
--- a/t/op/fork.t
+++ b/t/op/fork.t
@@ -9,6 +9,8 @@ BEGIN {
require Config;
skip_all('no fork')
unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
+ skip_all('no fork')
+ if $^O eq 'MSWin32' && is_miniperl;
}
$|=1;
diff --git a/t/op/magic.t b/t/op/magic.t
index bb9d175..3fbec7b 100644
--- a/t/op/magic.t
+++ b/t/op/magic.t
@@ -684,8 +684,10 @@ is $_, undef, '${^E_NCODING} is undef';
# ^^^^^^^^^ New tests go here ^^^^^^^^^
SKIP: {
- skip("%ENV manipulations fail or aren't safe on $^O", 19)
+ skip("%ENV manipulations fail or aren't safe on $^O", 20)
if $Is_Dos;
+ skip "Win32 needs XS for env/shell tests", 20
+ if $Is_MSWin32 && is_miniperl;
SKIP: {
skip("clearing \%ENV is not safe when running under valgrind or on VMS")
diff --git a/t/op/sselect.t b/t/op/sselect.t
index d0dc33b..212c69a 100644
--- a/t/op/sselect.t
+++ b/t/op/sselect.t
@@ -9,6 +9,9 @@ BEGIN {
require './test.pl';
+skip_all("Win32 miniperl has no socket select")
+ if $^O eq "MSWin32" && is_miniperl();
+
plan (15);
my $blank = "";
diff --git a/t/op/stat.t b/t/op/stat.t
index 2c28e1e..1461b52 100644
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -19,6 +19,11 @@ if(eval {require File::Spec; 1}) {
diag("\ncontinuing, assuming '.' for current directory. Some tests will be skipped.");
}
+if ($^O eq 'MSWin32') {
+ # under minitest, buildcustomize sets this to 1, which means
+ # nlinks isn't populated properly, allow nlinks tests to pass
+ ${^WIN32_SLOPPY_STAT} = 0;
+}
plan tests => 113;
diff --git a/t/op/tie_fetch_count.t b/t/op/tie_fetch_count.t
index 65e8be0..41fef0c 100644
--- a/t/op/tie_fetch_count.t
+++ b/t/op/tie_fetch_count.t
@@ -257,7 +257,10 @@ $dummy = crypt $var,0; check_count 'crypt $tied_utf8, ...';
$var = substr(chr 256,0,0);
$dummy = crypt 0,$var; check_count 'crypt ..., $tied_utf8';
+SKIP:
{
+ skip "select not implemented on Win32 miniperl", 3
+ if $^O eq "MSWin32" and is_miniperl;
no warnings;
$var = *foo;
$dummy = select $var, undef, undef, 0
diff --git a/t/run/switches.t b/t/run/switches.t
index 09b77c7..78915e0 100644
--- a/t/run/switches.t
+++ b/t/run/switches.t
@@ -298,13 +298,17 @@ is runperl(stderr => 1, prog => '#!perl -M'),
local $TODO = ''; # these ones should work on VMS
# there are definitely known build configs where this test will fail
# DG/UX comes to mind. Maybe we should remove these special cases?
- my $v = sprintf "%vd", $^V;
- my $ver = $Config{PERL_VERSION};
- my $rel = $Config{PERL_SUBVERSION};
- like( runperl( switches => ['-v'] ),
- qr/This is perl 5, version \Q$ver\E, subversion \Q$rel\E \(v\Q$v\E(?:[-*\w]+| \([^)]+\))?\) built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s,
- '-v looks okay' );
-
+ SKIP:
+ {
+ skip "Win32 miniperl produces a default archname in -v", 1
+ if $^O eq 'MSWin32' && is_miniperl;
+ my $v = sprintf "%vd", $^V;
+ my $ver = $Config{PERL_VERSION};
+ my $rel = $Config{PERL_SUBVERSION};
+ like( runperl( switches => ['-v'] ),
+ qr/This is perl 5, version \Q$ver\E, subversion \Q$rel\E \(v\Q$v\E(?:[-*\w]+| \([^)]+\))?\) built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License ... [3 chars truncated]
+ '-v looks okay' );
+ }
}
# Tests for -h
diff --git a/win32/Makefile b/win32/Makefile
index 8e700ab..3ca3376 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -1320,7 +1320,7 @@ minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) utils $(UNIDATAFILES)
attrib -r ..\t\*.*
cd ..\t && \
# Note this perl.exe is miniperl
- perl.exe harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
+ perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
test-prep : all utils ../pod/perltoc.pod
$(XCOPY) $(PERLEXE) ..\t\$(NULL)
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 1c16dba..bfe5458 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -1597,7 +1597,7 @@ minitest : $(MINIPERL) $(GLOBEXE) $(CONFIGPM) $(UNIDATAFILES) utils
attrib -r ..\t\*.*
cd ..\t && \
# Note this perl.exe is miniperl
- perl.exe harness base/*.t comp/*.t cmd/*.t io/*.t opbasic/*.t op/*.t pragma/*.t
+ perl.exe TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t pragma/*.t
test-prep : all utils ..\pod\perltoc.pod
$(XCOPY) $(PERLEXE) ..\t\$(NULL)
diff --git a/win32/win32.h b/win32/win32.h
index 5a48b0b..5b70557 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -23,6 +23,10 @@
# define WIN32_NO_SOCKETS
/* less I/O calls during each require */
# define PERL_DISABLE_PMC
+
+/* allow minitest to work */
+# define USE_PERLIO
+# define PERL_TEXTMODE_SCRIPTS
#endif
#ifdef WIN32_NO_SOCKETS
--
Perl5 Master Repository