Add the "./Build test_tap" action which outputs plain TAP

agranig/peering-route
Gerhard Jungwirth 13 years ago
parent cb2e48989f
commit b541d7c8c0

@ -109,6 +109,8 @@ Build.PL - NGCP-Panel build system including test fixtures
./Build test --webdriver=selenium-rc # from CPAN distro Alien-SeleniumRC
./Build test --webdriver=external --wd-server=127.0.0.1:5555
./Build test_tap --webdriver=external # outputs tap to tap/ folder
./Build testcover --webdriver='phantomjs --webdriver=4444'
=head2 Options
@ -129,7 +131,7 @@ external if the webdriver is launched externally
=head2 C<--wd-server>
Host:Port of the webdriver to which the tests should connect.
Default is set by Test::WebDriver to localhost
Default is set by Test::WebDriver to localhost:4444
=head2 C<--server>

@ -34,9 +34,8 @@ sub shutdown_servers {
}
}
around('ACTION_test', sub {
my $super = shift;
my $self = shift;
sub _test_preconditions {
my ($self) = @_;
require Getopt::Long;
my %opt = (server => 'http://localhost:5000');
@ -73,6 +72,14 @@ around('ACTION_test', sub {
};
$self->wait_socket($uri->host, $uri->port);
$ENV{CATALYST_SERVER} = $opt{server};
}
around('ACTION_test', sub {
my $super = shift;
my $self = shift;
$self->_test_preconditions;
try {
$self->$super(@_);
};
@ -103,4 +110,12 @@ method ACTION_testcover {
$self->do_system(qw(cover));
}
method ACTION_test_tap {
$self->depends_on('code');
$self->_test_preconditions;
system( "mkdir -p tap" );
$ENV{PERL_TEST_HARNESS_DUMP_TAP} = "tap/";
$self->generic_test(type => 'default');
}
END { shutdown_servers }

Loading…
Cancel
Save