diff --git a/Build.PL b/Build.PL index cba491eb98..4c6352aa0a 100644 --- a/Build.PL +++ b/Build.PL @@ -5,6 +5,10 @@ my $builder = Local::Module::Build->new( module_name => 'NGCP::Panel', license => 'restrictive', dist_version_from => 'lib/NGCP/Panel.pm', + tap_harness_args => { + formatter_class => 'TAP::Formatter::JUnit', + merge => 1, + }, configure_requires => { 'lib' => 0, 'Module::Build' => '0.4004', @@ -13,6 +17,7 @@ my $builder = Local::Module::Build->new( }, requires => { 'base' => 0, + 'Capture::Tiny' => 0, 'Catalyst::Action::RenderView' => 0, 'Catalyst::ActionRole::ACL' => 0, 'Catalyst::Model::DBIC::Schema' => 0, diff --git a/inc/Local/Module/Build.pm b/inc/Local/Module/Build.pm index 544cbe968c..cfb58abd1f 100644 --- a/inc/Local/Module/Build.pm +++ b/inc/Local/Module/Build.pm @@ -2,6 +2,7 @@ package Local::Module::Build; use Sipwise::Base; use Moose qw(around); use Child qw(child); +use Capture::Tiny qw(capture_merged); use TryCatch; use MooseX::Method::Signatures; extends 'Module::Build'; @@ -64,6 +65,8 @@ sub _test_preconditions { require File::Which; $ENV{ NGCP_PANEL_CONFIG_LOCAL_SUFFIX } = "testing"; $plackup = child { + my $debug_fh = IO::File->new("panel_debug_output", "w+"); + capture_merged { exec $^X, '-Ilib', exists $opt{'schema-base-dir'} ? "-Mblib=$opt{'schema-base-dir'}" : (), @@ -71,6 +74,7 @@ sub _test_preconditions { scalar File::Which::which('plackup'), sprintf('--listen=%s:%s', $uri->host, $uri->port), 'ngcp_panel.psgi'; + } stdout => $debug_fh; }; $self->wait_socket($uri->host, $uri->port); $ENV{CATALYST_SERVER} = $opt{server};