Use JUnit output by default with ./Build test

to not interfere with the JUnit output the panel output is redirected to a file
agranig/peering-route
Gerhard Jungwirth 12 years ago
parent 962eced885
commit 03f08d19aa

@ -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,

@ -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};

Loading…
Cancel
Save