geoff 2004/06/24 06:25:30
Modified: perl-framework/Apache-Test Changes
perl-framework/Apache-Test/lib/Apache TestRun.pm
Log:
add -no-httpd runtime option to allow tests to run without configuring,
starting, or stopping Apache. this essentially provides a direct
Test::Harness interface through t/TEST, useful for running single tests
that do not depend on Apache.
Revision Changes Path
1.140 +5 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- Changes 23 Jun 2004 15:51:15 -0000 1.139
+++ Changes 24 Jun 2004 13:25:30 -0000 1.140
@@ -8,6 +8,11 @@
=item 1.12-dev
+add -no-httpd runtime option to allow tests to run without configuring,
+starting, or stopping Apache. this essentially provides a direct
+Test::Harness interface through t/TEST, useful for running single tests
+that do not depend on Apache. [Geoffrey Young]
+
Add support for Module::Build, with a new module: Apache::TestMB (a
"clone" of Apache::TestMM for ExtUtils::MakeMaker). [David Wheeler
<[EMAIL PROTECTED]>]
1.171 +10 -3
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
Index: TestRun.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- TestRun.pm 26 May 2004 02:14:36 -0000 1.170
+++ TestRun.pm 24 Jun 2004 13:25:30 -0000 1.171
@@ -49,7 +49,8 @@
my %original_t_perms = ();
my @std_run = qw(start-httpd run-tests stop-httpd);
-my @others = qw(verbose configure clean help ssl http11 bugreport
save);
+my @others = qw(verbose configure clean help ssl http11 bugreport
+ save no-httpd);
my @flag_opts = (@std_run, @others);
my @string_opts = qw(order trace);
my @ostring_opts = qw(proxy ping);
@@ -68,6 +69,7 @@
'order=mode' => 'run the tests in one of the modes: ' .
'(repeat|rotate|random|SEED)',
'stop-httpd' => 'stop the test server',
+ 'no-httpd' => 'run the tests without configuring or starting
httpd',
'verbose[=1]' => 'verbose output',
'configure' => 'force regeneration of httpd.conf ' .
' (tests will not be run)',
@@ -475,6 +477,11 @@
sub configure {
my $self = shift;
+ if ($self->{opts}->{'no-httpd'}) {
+ warning "skipping httpd configuration";
+ return;
+ }
+
# create the conf dir as early as possible
$self->{test_config}->prepare_t_conf();
@@ -745,11 +752,11 @@
$self->die_on_invalid_args;
- $self->start;
+ $self->start unless $self->{opts}->{'no-httpd'};
$self->run_tests;
- $self->stop;
+ $self->stop unless $self->{opts}->{'no-httpd'};
}
# make it easy to move the whole distro w/o running