From 8053b81598ef346182082796415e3caa6e96d6eb Mon Sep 17 00:00:00 2001 From: Florian Ragwitz Date: Thu, 7 Jul 2011 16:12:10 +0200 Subject: [PATCH] Drop non-TAP output from Maintainers.pm --- Porting/Maintainers.pm | 48 ++++++++++++------------------------------------ t/porting/maintainers.t | 4 ++-- 2 files changed, 14 insertions(+), 38 deletions(-) diff --git a/Porting/Maintainers.pm b/Porting/Maintainers.pm index c98413a..3e6697f 100644 --- a/Porting/Maintainers.pm +++ b/Porting/Maintainers.pm @@ -20,7 +20,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION); @EXPORT_OK = qw(%Modules %Maintainers get_module_files get_module_pat show_results process_options files_to_modules - finish_tap_output + finish_tap_output reload_manifest); $VERSION = 0.06; @@ -134,10 +134,6 @@ or --opened | file .... List the module ownership of modified or the listed files - --tap-output - Show results as valid TAP output. Currently only compatible - with --check, --checkmani - Matching is case-ignoring regexp, author matching is both by the short id and by the full name and email. A "module" may not be just a module, it may be a file or files or a subdirectory. @@ -153,7 +149,6 @@ my $Check; my $Checkmani; my $Opened; my $TestCounter = 0; -my $TapOutput; sub process_options { usage() @@ -165,7 +160,6 @@ sub process_options { 'check' => \$Check, 'checkmani' => \$Checkmani, 'opened' => \$Opened, - 'tap-output' => \$TapOutput, ); my @Files; @@ -353,32 +347,20 @@ sub maintainers_files { sub duplicated_maintainers { maintainers_files(); for my $f (keys %files) { - if ($TapOutput) { - if ($files{$f} > 1) { - print "not ok ".++$TestCounter." - File $f appears $files{$f} times in Maintainers.pl\n"; - } else { - print "ok ".++$TestCounter." - File $f appears $files{$f} times in Maintainers.pl\n"; - } - } else { - if ($files{$f} > 1) { - warn "File $f appears $files{$f} times in Maintainers.pl\n"; - } - } + if ($files{$f} > 1) { + print "not ok ".++$TestCounter." - File $f appears $files{$f} times in Maintainers.pl\n"; + } else { + print "ok ".++$TestCounter." - File $f appears $files{$f} times in Maintainers.pl\n"; + } } } sub warn_maintainer { my $name = shift; - if ($TapOutput) { - if ($files{$name}) { - print "ok ".++$TestCounter." - $name has a maintainer\n"; - } else { - print "not ok ".++$TestCounter." - $name has NO maintainer\n"; - - } - + if ($files{$name}) { + print "ok ".++$TestCounter." - $name has a maintainer\n"; } else { - warn "File $name has no maintainer\n" if not $files{$name}; + print "not ok ".++$TestCounter." - $name has NO maintainer\n"; } } @@ -395,16 +377,10 @@ sub missing_maintainers { sub superfluous_maintainers { maintainers_files(); for my $f (keys %files) { - if ($TapOutput) { - if ($MANIFEST{$f}) { - print "ok ".++$TestCounter." - Maintained file $f appears in MANIFEST\n"; - } else { - print "not ok ".++$TestCounter." - File $f has has a maintainer but is not in MANIFEST\n"; - } + if ($MANIFEST{$f}) { + print "ok ".++$TestCounter." - Maintained file $f appears in MANIFEST\n"; } else { - if (!$MANIFEST{$f}) { - warn "File $f has has a maintainer but is not in MANIFEST\n"; - } + print "not ok ".++$TestCounter." - File $f has has a maintainer but is not in MANIFEST\n"; } } } diff --git a/t/porting/maintainers.t b/t/porting/maintainers.t index 287047f..f5edaa8 100644 --- a/t/porting/maintainers.t +++ b/t/porting/maintainers.t @@ -23,12 +23,12 @@ if ($^O eq 'VMS') { } { - local @ARGV = qw|--tap-output --checkmani|; + local @ARGV = qw|--checkmani|; show_results(process_options()); } { - local @ARGV = qw|--tap-output --checkmani lib/ ext/|; + local @ARGV = qw|--checkmani lib/ ext/|; show_results(process_options()); } -- 2.7.4