2 # Simple subunit parser
3 # (C) 2006 Jelmer Vernooij <jelmer@samba.org>
16 my $result = GetOptions
(
17 'help|h|?' => \
$opt_help,
18 'progress' => \
$opt_progress
26 print "subunit output summarizer\n";
27 print "Copyright (C) 2006 Jelmer Vernooij <jelmer\@samba.org>\n";
29 print "Usage: subunit-summary [OPTION]\n";
30 print " --help Print this help message\n";
36 next unless (/^(.+): (.+?)( \[)?$/);
39 } elsif ($1 eq "error") {
40 print "E" if ($opt_progress);
41 } elsif ($1 eq "failure") {
43 print "F" if ($opt_progress);
44 } elsif ($1 eq "success") {
46 print "." if ($opt_progress);
47 } elsif ($1 eq "skip") {
49 print "I" if ($opt_progress);
50 } elsif ($1 eq "testsuite") {
52 if ($numtests) { print "\n"; }
58 print "\n" if ($opt_progress);
61 print "No tests run\n";
65 printf("%d%%: %d tests, %d succeeded, %d failed, %d skipped\n",
66 ($numsuccess / $numtests * 100),