joes 2003/04/05 15:57:03
Modified: . Makefile.PL
Log:
Hacked Makefile.PL to use Apache::Test; probably broken on Win32 though.
Revision Changes Path
1.19 +21 -11 httpd-apreq/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/httpd-apreq/Makefile.PL,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Makefile.PL 1 Mar 2003 00:37:34 -0000 1.18
+++ Makefile.PL 5 Apr 2003 23:57:03 -0000 1.19
@@ -4,7 +4,14 @@
use 5.005;
use File::Path qw(mkpath);
+use lib qw(Apache-Test/lib);
+use constant HAS_APACHE_TEST => eval {require Apache::Test};
+# enable 'make test|clean'
+if (HAS_APACHE_TEST) {
+ require Apache::TestMM;
+ Apache::TestMM->import(qw(test clean));
+}
BEGIN {
unless (eval {require mod_perl}) {
die "Please install mod_perl: 1.25 < version < 1.99\n($@)";
@@ -24,16 +31,19 @@
if (not $Is_Win32) {
eval {
- require Apache::test;
- local $SIG{ALRM} = sub { die "alarm\n" };
- alarm 60;
- my %params = Apache::test->get_test_params();
- alarm 0;
-
- Apache::test->write_httpd_conf(%params, include => $conf_data);
- *MY::test = sub {Apache::test->MM_test(%params)};
+ require Apache::Test;
+ # accept the configs from command line
+ Apache::TestMM::filter_args();
+ Apache::TestMM::generate_script('t/TEST');
+# local $SIG{ALRM} = sub { die "alarm\n" };
+# alarm 60;
+# my %params = Apache::test->get_test_params();
+# alarm 0;
+
+# Apache::test->write_httpd_conf(%params, include => $conf_data);
+# *MY::test = sub {Apache::test->MM_test(%params)};
};
- print "\n[timeout] skipping test setup...\n" if $@ eq "alarm\n";
+ print "\nskipping test setup...$@" if $@;
}
else {
write_win32_conf();
@@ -41,7 +51,7 @@
# prerequisites
my %require = (
- "Apache::test" => "", # any version will do
+ "Apache::Test" => "", # any version will do
);
my $myVERSION = MM->parse_version('Request/Request.pm');
@@ -87,7 +97,7 @@
);
sub clean_files {
- return [qw( t/httpd.conf t/httpd.loc t/error_log t/httpd )];
+ return [qw( t/TEST t/httpd.conf t/httpd.loc t/error_log t/httpd )];
}
if ($Is_Win32 and -e $lib) {