httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Apache-TestItSelf
Date Wed, 03 Nov 2004 00:56:03 GMT
Before we can try to improve the problems with A-T config issues, we need 
a test suite. Since until now, every fix was breaking 10 other things.

So I've started working on one. It's probably going to change a lot, but I 
have a working prototype. In order to use it apply the attached patch 
against Apache-Test/ and run:

perl Makefile.PL

now the t_c/TEST script runs the tests against Apache-Test, modperl-2.0, 
other CPAN modules.

All you need to do is to supply a config file for each group of the above 
tests. For example:

I run this against Apache-Test:

t_c/TEST -v -base ~/work/modules/Apache-VMonitor-2.0 -config 
~/.apache-test/apache_test_config.pm

where ~/.apache-test/apache_test_config.pm contains:

@Apache::TestItSelf::Configs = (
     {
      apxs_exec     => '/home/stas/httpd/prefork/bin/apxs',
      httpd_exec    => '/home/stas/httpd/prefork/bin/httpd',
      perl_exec     => '/home/stas/perl/5.8.5-ithread/bin/perl5.8.5',
      mp_gen        => 2.0,
      httpd_gen     => 2.0,
      httpd_version => 'Apache/2.0.53-dev',
      httpd_mpm     => 'prefork',
      makepl_arg    => '-libmodperl mod_perl-5.8.5-ithread.so',
      timeout       => 200,
     },
     {
      apxs_exec     => '/home/stas/httpd/worker/bin/apxs',
      httpd_exec    => '/home/stas/httpd/worker/bin/httpd',
      perl_exec     => '/home/stas/perl/5.8.5-ithread/bin/perl5.8.5',
      mp_gen        => 2.0,
      httpd_gen     => 2.0,
      httpd_version => 'Apache/2.0.53-dev',
      httpd_mpm     => 'worker',
      makepl_arg    => '-libmodperl mod_perl-5.8.5-ithread.so',
      timeout       => 200,
     },

);


1;

Next I run the same tests against Apache-VMonitor-2.0 (or any other module 
that deployes A-T):

t_c/TEST -v -base ~/work/modules/Apache-VMonitor-2.0 -config 
~/.apache-test/apache2_modules_testitself_config.pm

where ~/.apache-test/apache2_modules_testitself_config.pm is:

@Apache::TestItSelf::Configs = (
     {
      apxs_exec     => '/home/stas/httpd/prefork/bin/apxs',
      httpd_exec    => '/home/stas/httpd/prefork/bin/httpd',
      perl_exec     => '/home/stas/perl/5.8.5-ithread/bin/perl5.8.5',
      mp_gen        => 2.0,
      httpd_gen     => 2.0,
      httpd_version => 'Apache/2.0.53-dev',
      httpd_mpm     => 'prefork',
      makepl_arg    => 'MOD_PERL=2 -libmodperl mod_perl-5.8.5-ithread.so',
      timeout       => 200,
      test_verbose  => 0,
     },
     {
      apxs_exec     => '/home/stas/httpd/worker/bin/apxs',
      httpd_exec    => '/home/stas/httpd/worker/bin/httpd',
      perl_exec     => '/home/stas/perl/5.8.5-ithread/bin/perl5.8.5',
      mp_gen        => 2.0,
      httpd_gen     => 2.0,
      httpd_version => 'Apache/2.0.53-dev',
      httpd_mpm     => 'worker',
      makepl_arg    => 'MOD_PERL=2 -libmodperl mod_perl-5.8.5-ithread.so',
      timeout       => 200,
      test_verbose  => 0,
     },

);

1;

and finally modperl-2.0:

t_c/TEST -v -base ~/apache.org/mp2-cvs -config 
~/.apache-test/modperl2_testitself_config.pm t_c/httpd_arg.t

where ~/.apache-test/modperl2_testitself_config.pm

@Apache::TestItSelf::Configs = (
     {
      apxs_exec     => '/home/stas/httpd/prefork/bin/apxs',
      httpd_exec    => '/home/stas/httpd/prefork/bin/httpd',
      perl_exec     => '/home/stas/perl/5.8.5-ithread/bin/perl5.8.5',
      mp_gen        => 2.0,
      httpd_gen     => 2.0,
      httpd_version => 'Apache/2.0.53-dev',
      httpd_mpm     => 'prefork',
      makepl_arg    => 'MP_APXS=/home/stas/httpd/prefork/bin/apxs 
MP_INST_APACHE2=1 MP_MAINTAINER=1',
      timeout       => 900,
     },
     {
      apxs_exec     => '/home/stas/httpd/worker/bin/apxs',
      httpd_exec    => '/home/stas/httpd/worker/bin/httpd',
      perl_exec     => '/home/stas/perl/5.8.5-ithread/bin/perl5.8.5',
      mp_gen        => 2.0,
      httpd_gen     => 2.0,
      httpd_version => 'Apache/2.0.53-dev',
      httpd_mpm     => 'worker',
      makepl_arg    => 'MP_APXS=/home/stas/httpd/worker/bin/apxs 
MP_INST_APACHE2=1 MP_MAINTAINER=1',
      timeout       => 900,
     },

);

1;

t_c/interactive.t can't be run with modperl-2.0. I'm going to add the skip 
mechanism via the config files.

(The only practical problem I see at the moment is that things are pretty 
slow... but it's better than no tests suite at all).

The config files are going to evolve and the key names will change too...

At the moment there are only 2 test files, more will be added as things 
evolve.

Comments are welcome. I'd like to start committing things after some 
additional polish if there are no objections.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message