diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-11 22:14:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:01:40 -0500 |
commit | 7ce6a75f4b7c0fc282fbc0d4387843a278430eb1 (patch) | |
tree | 08c508d867c5052e773f91efee8a0f5e6512f77d /source4/script/subunit-summary | |
parent | bc13766a76c88e45117c8a1fd95a08d2c96789cd (diff) | |
download | samba-7ce6a75f4b7c0fc282fbc0d4387843a278430eb1.tar.gz samba-7ce6a75f4b7c0fc282fbc0d4387843a278430eb1.tar.bz2 samba-7ce6a75f4b7c0fc282fbc0d4387843a278430eb1.zip |
r24338: Add callbacks for starting and finishing tests.
(This used to be commit 824833b59a1c9c829cea4e5c4bfd2387b1bc7a2f)
Diffstat (limited to 'source4/script/subunit-summary')
-rwxr-xr-x | source4/script/subunit-summary | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/source4/script/subunit-summary b/source4/script/subunit-summary deleted file mode 100755 index aec50ed02a..0000000000 --- a/source4/script/subunit-summary +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl -# Simple subunit parser -# (C) 2006 Jelmer Vernooij <jelmer@samba.org> - -use strict; -use Getopt::Long; - -my $numtests = 0; -my $numfails = 0; -my $numskips = 0; -my $numsuccess = 0; - -my $opt_help = 0; -my $opt_progress = 0; - -my $result = GetOptions ( - 'help|h|?' => \$opt_help, - 'progress' => \$opt_progress - ); - -if (not $result) { - exit(1); -} - -if ($opt_help) { - print "subunit output summarizer\n"; - print "Copyright (C) 2006 Jelmer Vernooij <jelmer\@samba.org>\n"; - print "\n"; - print "Usage: subunit-summary [OPTION]\n"; - print " --help Print this help message\n"; - print "\n"; - exit(0); -} - -while(<STDIN>) { - next unless (/^(.+): (.+?)( \[)?$/); - if ($1 eq "test") { - $numtests++; - } elsif ($1 eq "error") { - print "E" if ($opt_progress); - } elsif ($1 eq "failure") { - $numfails++; - print "F" if ($opt_progress); - } elsif ($1 eq "success") { - $numsuccess++; - print "." if ($opt_progress); - } elsif ($1 eq "skip") { - $numskips++; - print "I" if ($opt_progress); - } elsif ($1 eq "testsuite") { - if ($opt_progress) { - if ($numtests) { print "\n"; } - print "$2: "; - } - } -} - -print "\n" if ($opt_progress); - -if ($numtests == 0) { - print "No tests run\n"; - exit(0); -} - -printf("%d%%: %d tests, %d succeeded, %d failed, %d skipped\n", - ($numsuccess / $numtests * 100), - $numtests, - $numsuccess, - $numfails, - $numskips); |