~ubuntu-branches/ubuntu/warty/libapache2-mod-perl2/warty

« back to all changes in this revision

Viewing changes to lib/ModPerl/TestRun.pm

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2004-02-13 22:22:35 UTC
  • Revision ID: james.westby@ubuntu.com-20040213222235-x0ggyscn50jvab2v
Tags: upstream-1.99.12
ImportĀ upstreamĀ versionĀ 1.99.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package ModPerl::TestRun;
 
2
 
 
3
use strict;
 
4
use warnings FATAL => 'all';
 
5
 
 
6
use base qw(Apache::TestRunPerl);
 
7
 
 
8
# some mp2 tests require more than one server instance to be available
 
9
# without which the server may hang, waiting for the single server
 
10
# become available
 
11
use constant MIN_MAXCLIENTS => 2;
 
12
 
 
13
use Apache::Build;
 
14
my $build = Apache::Build->build_config;
 
15
 
 
16
sub new_test_config {
 
17
    my $self = shift;
 
18
 
 
19
    # timeout in secs (threaded mpms are extremely slow to startup,
 
20
    # due to a slow perl_clone operation)
 
21
    $self->{conf_opts}->{startup_timeout} =
 
22
        $build->mpm_is_threaded() ? 180 : 120;
 
23
 
 
24
    $self->{conf_opts}->{maxclients} ||= MIN_MAXCLIENTS;
 
25
 
 
26
    ModPerl::TestConfig->new($self->{conf_opts});
 
27
}
 
28
 
 
29
sub bug_report {
 
30
    my $self = shift;
 
31
 
 
32
    print <<EOI;
 
33
+--------------------------------------------------------+
 
34
| Please file a bug report: http://perl.apache.org/bugs/ |
 
35
+--------------------------------------------------------+
 
36
EOI
 
37
}
 
38
 
 
39
package ModPerl::TestConfig;
 
40
 
 
41
use base qw(Apache::TestConfig);
 
42
 
 
43
# don't inherit LoadModule perl_module from the apache httpd.conf
 
44
sub should_skip_module {
 
45
    my($self, $name) = @_;
 
46
 
 
47
    $name eq 'mod_perl.c' ? 1 : $self->SUPER::should_skip_module($name);
 
48
}
 
49
 
 
50
1;
 
51