Skip Menu |

This queue is for tickets about the Module-Install-StandardTests CPAN distribution.

Report information
The Basics
Id: 125772
Status: new
Priority: 0/
Queue: Module-Install-StandardTests

People
Owner: Nobody in particular
Requestors: david [...] coppit.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.05
Fixed in: (no value)



Subject: Compile test fails on Windows
Test::Compile uses fork(), which on Windows doesn't work. It results in an error such as: Free to wrong pool 1d03e90 not 270c080 at t/000_standard__compile.t line 12 during global destruction. All my modules started failing on Windows. e.g. http://www.cpantesters.org/cpan/report/7b7b73e9-77f5-1014-8dac-e4cc5f496936 Here's a patch to just skip it on Windows: BEGIN { + if ($^O eq 'MSWin32') { + use Test::More skip_all => + "Test::Compile doesn't work properly on Windows"; + } else { use Test::More; eval "use Test::Compile"; Test::More->builder->BAIL_OUT( "Test::Compile required for testing compilation") if $@; all_pm_files_ok(); + } }
It turns out that I should have tested my code better. This is my workaround, which I put into Makefile.PL before calling use_standard_tests() # ---- Workaround for broken module ---- # https://rt.cpan.org/Ticket/Display.html?id=125772 { package Module::Install::StandardTests; sub write_standard_test_compile { my $self = shift; $self->write_test_file('000_standard__compile.t', q/ BEGIN { if ($^O eq 'MSWin32') { require Test::More; Test::More->import(skip_all => "Test::Compile doesn't work properly on Windows"); } else { require Test::More; Test::More->import(); eval "use Test::Compile"; Test::More->builder->BAIL_OUT( "Test::Compile required for testing compilation") if $@; all_pm_files_ok(); } } /); } }