# New Ticket Created by Alberto Simoes
# Please include the string: [perl #37947]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37947 >
Basically, count tests, count tests ok, give rate. Useful if you want to
run smoke and look to the output just at the end.
I think it is useful.
--
Alberto Simões - Departamento de Informática - Universidade do Minho
Campus de Gualtar - 4710-057 Braga - Portugal
Index: t/harness
===================================================================
--- t/harness (revision 10525)
+++ t/harness (working copy)
@@ -170,11 +170,18 @@
$self->_init;
$self->{meat}{start_time} = time;
+ my %stats;
+
foreach my $file (@_) {
- print STDERR "- $file\n";
- $self->run_test($file);
+ my $data;
+ print STDERR "- $file\n";
+ $data = $self->run_test($file);
+ $stats{tests} += $data->{results}{max};
+ $stats{ok} += $data->{results}{ok};
}
+ printf STDERR "$stats{ok} OK from $stats{tests} tests (%.2f%% ok)\n\n",
+ $stats{ok}/$stats{tests}*100;
$self->{meat}{end_time} = time;
};