stas 01/11/08 17:42:36
Modified: perl-framework/Apache-Test/lib/Apache Test.pm
Log:
- report all the reasons for skipping a test at once
Revision Changes Path
1.29 +11 -7 httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm
Index: Test.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Test.pm 2001/11/09 01:30:35 1.28
+++ Test.pm 2001/11/09 01:42:35 1.29
@@ -149,27 +149,31 @@
my @reasons = ();
for (@modules) {
- my $reason;
if (/^[a-z0-9_]+$/) {
my $mod = $_;
$mod = 'mod_' . $mod unless $mod =~ /^mod_/;
$mod .= '.c' unless $mod =~ /\.c$/;
next if $cfg->{modules}->{$mod};
if (exists $cfg->{cmodules_disabled}->{$mod}) {
- push @SkipReasons, $cfg->{cmodules_disabled}->{$mod};
- return 0;
+ push @reasons, $cfg->{cmodules_disabled}->{$mod};
+ next;
}
}
die "bogus module name $_" unless /^[\w:.]+$/;
eval "require $_";
#print $@ if $@;
if ($@) {
- push @SkipReasons, "cannot find $_";
- return 0;
+ push @reasons, "cannot find $_";
+ next;
}
}
-
- return 1;
+ if (@reasons) {
+ push @SkipReasons, @reasons;
+ return 0;
+ }
+ else {
+ return 1;
+ }
}
sub have_cgi {