App-TestOnTap
view release on metacpan or search on metacpan
lib/App/TestOnTap/Harness.pm view on Meta::CPAN
use TAP::Formatter::Console;
use TAP::Formatter::File;
use List::Util qw(max);
sub new
{
my $class = shift;
my $args = shift;
my $self = $class->SUPER::new
(
{
formatter => __getFormatter($args),
jobs => $args->getJobs(),
merge => $args->getMerge(),
callbacks => { after_test => $args->getWorkDirManager()->getResultCollector() },
'exec' => __getExecMapper($args),
scheduler_class => 'App::TestOnTap::Scheduler'
}
);
lib/App/TestOnTap/Harness.pm view on Meta::CPAN
$ENV{TESTONTAP_SUITE_DIR} = $sr;
$ENV{TESTONTAP_TMP_DIR} = $wdmgr->getTmp();
$ENV{TESTONTAP_SAVE_DIR} = $wdmgr->getSaveSuite();
if ($self->{testontap}->{args}->useHarness())
{
# the normal case is to run with a 'real' harness that parses
# TAP, handles parallelization, formatters and all that
#
$wdmgr->beginTestRun();
my $aggregator = $self->SUPER::runtests(@pairs);
$wdmgr->endTestRun($self->{testontap}->{args}, $aggregator);
$failed = $aggregator->failed() || 0;
}
else
{
# if the user has requested 'no harness', just run the jobs serially
# in the right context, but make no effort to parse their output
# in any way - more convenient for debugging (esp. with an execmap
# that can start a test in debug mode)
#
( run in 0.262 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )