I have a test suite which runs daily and I obviously don't want to be bothered hearing from it if everything passes :-). To that end I have used the facilities of TAP::Harness so that it only reports failures. Here's the (freshly anonymised) code:
use strict; use warnings; use TAP::Harness; use Data::Dumper; chdir "$ENV{HOME}/src/mymods/Foo" or die "Cannot access start dir"; my $harness = TAP::Harness->new ({verbosity => -3, lib => [ qw/lib/ ]} +); my $res = $harness->runtests (glob ('t/*.t')); exit 0 if $res->all_passed; # Problems my $fail_count = $res->failed; my $total_run = $res->total; print "Failed $fail_count out of $total_run tests run.\n"; print "\tFailed: $_\n" for $res->failed;
This has been running daily from cron for a couple of years. Not quite what you asked for but perhaps a feasible alternative. HTH.
🦛
In reply to Re: Test::More to only report fails?
by hippo
in thread Test::More to only report fails?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |