gozer 2003/06/05 00:38:46
Modified: . MANIFEST Makefile.PL
t .cvsignore
Added: t TEST.PL
Removed: t TEST
Log:
t/TEST is now autogenerated, getting the right #!perl
Revision Changes Path
1.72 +1 -1 modperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/modperl/MANIFEST,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- MANIFEST 25 May 2003 10:54:06 -0000 1.71
+++ MANIFEST 5 Jun 2003 07:38:46 -0000 1.72
@@ -98,7 +98,7 @@
src/opcodes.txt
t/report.PL
t/README
-t/TEST
+t/TEST.PL
t/TEST.win32
t/conf/httpd.conf.pl
t/conf/httpd.conf-dist
1.213 +2 -0 modperl/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl/Makefile.PL,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -r1.212 -r1.213
--- Makefile.PL 5 Jun 2003 07:09:19 -0000 1.212
+++ Makefile.PL 5 Jun 2003 07:38:46 -0000 1.213
@@ -148,6 +148,7 @@
src/modules/perl/mod_perl_version.h
t/net/perl/cgi.pl
t/report
+ t/TEST
t/httpd
apaci/find_source
apaci/apxs_cflags
@@ -166,6 +167,7 @@
gen_script("t/net/perl/cgi.pl");
gen_script("t/report");
+gen_script("t/TEST");
gen_script("apaci/find_source");
gen_script("apaci/apxs_cflags");
gen_script("apaci/perl_config", "$PWD/lib");
1.4 +1 -0 modperl/t/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /home/cvs/modperl/t/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- .cvsignore 9 Jun 1998 16:53:09 -0000 1.3
+++ .cvsignore 5 Jun 2003 07:38:46 -0000 1.4
@@ -1,4 +1,5 @@
report
+TEST
logs
httpd.conf
httpd.conf.old
1.1 modperl/t/TEST.PL
Index: TEST.PL
===================================================================
$|++;
use Config;
# First we check if we already are within the "t" directory
if (-d "t") {
# try to move into test directory
chdir "t" or die "Can't chdir: $!";
# fix all relative library locations
foreach (@INC) {
$_ = "../$_" unless m,^(/)|([a-f]:),i;
}
}
# Pick up the library files from the ../blib directory
unshift(@INC, "../blib/lib", "../blib/arch");
#print "@INC\n";
use Test::Harness;
$Test::Harness::verbose = shift
if $ARGV[0] =~ /^\d+$/ || $ARGV[0] eq "-v";
if (@ARGV) {
for (@ARGV) {
if (-d $_) {
push(@tests, <$_/*.t>);
} else {
$_ .= ".t" unless /\.t$/;
push(@tests, $_);
}
}
} else {
#shutdown httpd before make aborts
$SIG{'__DIE__'} = sub {
return unless $_[0] =~ /^Failed/i;
my $el = "../t/logs/httpd.pid";
if(-e $el) {
system "kill `cat $el`";
}
else {
warn "can't stat $el $!\n";
}
warn "httpd terminated\n";
};
eval { require LWP::UserAgent; };
if ($@) {
print <<"EOM";
$@
I still can't find LWP::UserAgent, try:
$^X -MCPAN -e "install q{LWP}"
or
http://www.perl.com/cgi-bin/cpan_mod?module=LWP
Must skip important tests without LWP...
EOM
sleep(2);
exit;
}
else {
push(@tests, <modules/*.t>, <internal/*.t>);
}
}
unshift @INC, '.';
require Apache::testold;
Apache::testold->import('simple_fetch');
use subs 'simple_fetch';
unless (simple_fetch "/test.html") {
if ($^O eq "solaris" and $Config{myhostname} eq "ramona") {
print "go hang in the chill room $ENV{USER}, ramona is doggin...";
}
else {
print "still waiting for server to warm up...";
}
for (1..4) {
sleep $_;
if (simple_fetch "/test.html") {
print "ok\n";
}
else {
print "...";
}
}
}
unless (simple_fetch "/test.html") {
print "not ok\n";
die "server failed to start! (please examine t/logs/error_log)";
}
runtests @tests;
use File::Find;
my $dir = -e "t" ? ".." : ".";
find(sub {
/core/ and die "uh,oh httpd dumped core!\n";
}, $dir);