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

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