Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip tests requiring fork() when no fork() is available #481

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions t/HTTP-Server-PSGI/harakiri.t
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
use strict;
use warnings;

use Config;
use Plack::Runner;
use Test::More;
use Test::TCP;
use Test::Requires qw(LWP::UserAgent);

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

my $ua_timeout = 3;

test_tcp(
Expand Down
7 changes: 7 additions & 0 deletions t/HTTP-Server-PSGI/post.t
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
use strict;
use warnings;

use Config;
use Plack::Runner;
use Test::More;
use Test::TCP;
use Test::Requires qw(LWP::UserAgent);

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

test_tcp(
server => sub {
my $port = shift;
Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Handler/standalone.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
use strict;
use warnings;
use Config;
use Test::More;
use Plack::Test::Suite;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

Plack::Test::Suite->run_server_tests('Standalone');
done_testing();

7 changes: 7 additions & 0 deletions t/Plack-Middleware/component-leak.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
package MyComponent;
use strict;
use warnings;
use Config;
use Test::More;
use Scalar::Util qw/weaken/;
use parent 'Plack::Component';

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

sub call {
my $self = shift;
my $env = shift;
Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Middleware/error_document_streaming_app.t
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
use strict;
use warnings;
use Config;
use FindBin;
use Test::More;
use HTTP::Request::Common;
use Plack::Test;
use Plack::Builder;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = undef;
my @impl = ('Server', 'MockHTTP');
sub flip_backend {
Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Middleware/stacktrace/sigdie.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
use strict;
use warnings;
use Config;
use Test::More;
use Plack::Middleware::StackTrace;
use Plack::Test;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = "Server";
local $ENV{PLACK_SERVER} = "HTTP::Server::PSGI";

Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Middleware/stacktrace/utf8.t
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
use strict;
use warnings;
use Config;
use Test::More;
use Test::Requires { 'Devel::StackTrace::AsHTML' => 0.08 };
use Plack::Middleware::StackTrace;
use Plack::Test;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = "Server";
local $ENV{PLACK_SERVER} = "HTTP::Server::PSGI";

Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Middleware/urlmap_ports.t
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
use strict;
use Config;
use Test::More;
use Plack::App::URLMap;
use Plack::Test;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = "Server";
local $ENV{PLACK_SERVER} = "HTTP::Server::PSGI";

Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Request/double_port.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
use Config;
use Test::More;
use Plack::Test;
use Plack::Request;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = 'Server';
local $ENV{PLACK_SERVER} = "HTTP::Server::PSGI";

Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Request/upload-large.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
use strict;
use warnings;
use Config;
use Test::More;
use Plack::Request;
use Plack::Test;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

my $file = "share/baybridge.jpg";

my @backends = qw( Server MockHTTP );
Expand Down
8 changes: 8 additions & 0 deletions t/Plack-Test/2args.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
use Config;
use Plack::Test;
use Test::More;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = "Server";
local $ENV{PLACK_SERVER} = "HTTP::Server::PSGI";

Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Test/hello_server.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
use Config;
use Test::More;
use Plack::Test;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = "Server";
local $ENV{PLACK_SERVER} = "HTTP::Server::PSGI";

Expand Down
7 changes: 7 additions & 0 deletions t/Plack-Util/response_cb.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
use strict;
use warnings;
use Config;
use Plack::Util;
use Plack::Test;
use Test::More;
use HTTP::Request::Common;

plan skip_all => "fork not supported on this platform"
unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
(($^O eq 'MSWin32' || $^O eq 'NetWare') and
$Config::Config{useithreads} and
$Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);

$Plack::Test::Impl = "Server";

my $app = sub {
Expand Down