~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy-updates

« back to all changes in this revision

Viewing changes to ModPerl-Registry/t/TEST.PL

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2004-08-19 06:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040819062348-jxl4koqbtvgm8v2t
Tags: 1.99.14-4
Remove the LFS CFLAGS, and build-dep against apache2-*-dev (>= 2.0.50-10)
as we're backing out of the apache2/apr ABI transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
use base qw(Apache::TestRunPerl);
17
17
 
18
18
# redirect tests require 2 servers
19
 
use constant MIN_MAXCLIENTS => 2;
20
 
 
21
 
use Cwd ();
22
 
use File::Spec::Functions qw(splitpath splitdir catpath catdir rootdir);
 
19
use constant MIN_CLIENTS => 2;
 
20
 
 
21
use File::Spec::Functions qw(catdir);
 
22
use File::Basename qw(dirname);
 
23
 
 
24
use Apache::Build;
 
25
 
 
26
# default timeout in secs (threaded mpms are extremely slow to
 
27
# startup, due to a slow perl_clone operation)
 
28
use constant DEFAULT_STARTUP_TIMEOUT =>
 
29
    Apache::Build->build_config->mpm_is_threaded() ? 180 : 90;
23
30
 
24
31
# subclass new_test_config to add some config vars which will be
25
32
# replaced in generated httpd.conf
26
33
sub new_test_config {
27
34
    my $self = shift;
28
35
 
29
 
    my ($volume, $dir, $file) = splitpath Cwd::cwd(), 1;
30
 
    my @dir = grep {length} splitdir $dir;
31
 
    $dir = catdir @dir[0..($#dir-2)]; # remove two last dir segments
32
 
    my $base = catpath $volume, rootdir(), $dir, $file;
33
 
    $self->{conf_opts}->{src_dir} = catdir $base, qw(src modules perl);
34
 
 
35
 
    $self->{conf_opts}->{maxclients} = MIN_MAXCLIENTS;
 
36
    require Apache::Test;
 
37
    my $mp2_root_dir = dirname Apache::Test::vars('top_dir');
 
38
    $self->{conf_opts}->{src_dir} = catdir $mp2_root_dir,
 
39
        qw(src modules perl);
 
40
 
 
41
    $self->{conf_opts}->{startup_timeout} ||=
 
42
        $ENV{APACHE_TEST_STARTUP_TIMEOUT} ||
 
43
        DEFAULT_STARTUP_TIMEOUT;
 
44
 
 
45
    $self->{conf_opts}->{minclients} ||= MIN_CLIENTS;
36
46
 
37
47
    return $self->SUPER::new_test_config;
38
48
}