You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2003/12/12 08:14:40 UTC
cvs commit: modperl-2.0/lib/ModPerl TestReport.pm
stas 2003/12/11 23:14:40
Modified: bin mp2bug
. Makefile.PL Changes
Added: lib/ModPerl TestReport.pm
Log:
Extend the autogenerated bug report to include information about
installed modules of special interest (which may aid in understanding
the bug report), such as CGI.pm, Apache::Request, LWP, etc.
Revision Changes Path
1.2 +2 -2 modperl-2.0/bin/mp2bug
Index: mp2bug
===================================================================
RCS file: /home/cvs/modperl-2.0/bin/mp2bug,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -u -r1.1 -r1.2
--- mp2bug 10 Apr 2003 02:00:19 -0000 1.1
+++ mp2bug 12 Dec 2003 07:14:40 -0000 1.2
@@ -17,5 +17,5 @@
}
}
-require Apache::TestReportPerl;
-Apache::TestReportPerl->new(@ARGV)->run;
+require ModPerl::TestReport;
+ModPerl::TestReport->new(@ARGV)->run;
1.133 +2 -2 modperl-2.0/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -u -r1.132 -r1.133
--- Makefile.PL 7 Nov 2003 09:46:56 -0000 1.132
+++ Makefile.PL 12 Dec 2003 07:14:40 -0000 1.133
@@ -30,9 +30,9 @@
use File::Basename 'basename';
use Apache::Build ();
-use Apache::TestReportPerl ();
use Apache::TestSmokePerl ();
use Apache::TestTrace;
+use ModPerl::TestReport ();
use ModPerl::TestRun ();
use ModPerl::Code ();
use ModPerl::BuildMM ();
@@ -210,8 +210,8 @@
$build->save;
ModPerl::TestRun->generate_script;
+ ModPerl::TestReport->generate_script;
Apache::TestSmokePerl->generate_script;
- Apache::TestReportPerl->generate_script;
my $tables_dir = tables_dir($httpd_version);
1.278 +4 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -u -r1.277 -r1.278
--- Changes 12 Dec 2003 05:43:57 -0000 1.277
+++ Changes 12 Dec 2003 07:14:40 -0000 1.278
@@ -12,6 +12,10 @@
=item 1.99_12-dev
+Extend the autogenerated bug report to include information about
+installed modules of special interest (which may aid in understanding
+the bug report), such as CGI.pm, Apache::Request, LWP, etc. [Stas]
+
As the test suite keeps on growing, it takes longer time to
startup. Change the main test suite timeout to 180 secs for threaded
mpms and 120 secs for non-threaded ones. [Stas]
1.1 modperl-2.0/lib/ModPerl/TestReport.pm
Index: TestReport.pm
===================================================================
package ModPerl::TestReport;
use strict;
use warnings FATAL => 'all';
use base qw(Apache::TestReportPerl);
my @interesting_packages = qw(
CGI
Apache::Request
mod_perl
LWP
);
# we want to see only already installed packages, so skip over
# modules that are about to be installed
my @skip_dirs = qw(
blib/lib
blib/lib/Apache2
blib/arch
blib/arch/Apache2
lib
);
my $skip_dir_str = join '|', map { s|/|[/\\\\]|g; $_ } @skip_dirs;
my $skip_dir_pat = qr|[/\\]($skip_dir_str)[/\\]*$|;
sub packages {
# search in Apache2/ subdirs too
eval { require Apache2 };
my @inc = grep !/$skip_dir_pat/, @INC;
my %packages = ();
my $max_len = 0;
for my $package (sort @interesting_packages ) {
$max_len = length $package if length $package > $max_len;
my $filename = package2filename($package);
my @ver = ();
for my $dir (@inc) {
my $path = "$dir/$filename";
if (-e $path) {
no warnings 'redefine';
my $ver = eval { require $path;
delete $INC{$path};
$package->VERSION;
};
# two versions could be installed (one under Apache2/)
push @{ $packages{$package} }, $ver if $ver;
}
}
}
my @lines = "*** Packages of interest status:\n";
for my $package (sort @interesting_packages) {
my $vers = exists $packages{$package}
? join ", ", sort @{ $packages{$package} }
: "-";
push @lines, sprintf "%-${max_len}s: %s", $package, $vers;
}
return join "\n", @lines, '';
}
sub config {
my $self = shift;
my @report = ();
# core config
push @report, ModPerl::Config::as_string();
# installed packages
push @report, $self->packages;
# this report is generated by user/group
return join "\n", @report;
}
sub package2filename {
my $package = shift;
$package =~ s|::|/|g;
$package .= ".pm";
return $package;
}
1;
Re: cvs commit: modperl-2.0/lib/ModPerl TestReport.pm
Posted by Stas Bekman <st...@stason.org>.
stas@apache.org wrote:
> stas 2003/12/11 23:14:40
>
> Modified: bin mp2bug
> . Makefile.PL Changes
> Added: lib/ModPerl TestReport.pm
> Log:
> Extend the autogenerated bug report to include information about
> installed modules of special interest (which may aid in understanding
> the bug report), such as CGI.pm, Apache::Request, LWP, etc.
So now the autogenerated bug report includes new info. On my machine it adds:
*** Packages of interest status:
Apache::Request: -
CGI : 3.01
LWP : 5.76
mod_perl : 1.2901, 1.9912
Now that we have a mod_perl 2.0 specific report, is there anything else we
want users to report to us? I though of 'httpd -l' and 'ldd mod_perl.so' if
available, since quite often we end up asking for this information.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org