Skip to content

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

Open
steve-m-hay wants to merge 1 commit intoplack:masterfrom
steve-m-hay:master
Open

Skip tests requiring fork() when no fork() is available#481
steve-m-hay wants to merge 1 commit intoplack:masterfrom
steve-m-hay:master

Conversation

@steve-m-hay
Copy link

If you build perl on Windows without -DPERL_IMPLICIT_SYS (which I do, in
order to enable -DPEL_MALLOC, which seems faster than using the system
malloc()) then you don't get the fork() emulation and several of Plack's
tests fail.

This commit skips those tests in the same manner as various other CPAN
modules do in this case. This allows a normal "cpan install ..." of
Plack or anything depending on it (e.g. Dancer) to succeed without having
to "force" anything.

If you build perl on Windows without -DPERL_IMPLICIT_SYS (which I do, in
order to enable -DPEL_MALLOC, which seems faster than using the system
malloc()) then you don't get the fork() emulation and several of Plack's
tests fail.

This commit skips those tests in the same manner as various other CPAN
modules do in this case. This allows a normal "cpan install ..." of
Plack or anything depending on it (e.g. Dancer) to succeed without having
to "force" anything.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) when pulling 1ff3895 on steve-m-hay:master into 0f46dbb on plack:master.

@miyagawa
Copy link
Member

Thanks for the patch. But obviously repeating this same code chunk in 13 test files, as well as possibly a few other distribution is considered not the great practice.

I would suggest making this a Test:: module, so that we can inject in as a test requirement (like Test::Requires).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants