httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestRun.pm TestRunPerl.pm TestSmokePerl.pm
Date Mon, 31 Dec 2001 08:39:48 GMT
stas        01/12/31 00:39:48

  Modified:    perl-framework/Apache-Test/lib/Apache TestRun.pm
                        TestRunPerl.pm TestSmokePerl.pm
  Log:
  - add generate_script functions for autogenerated SMOKE, TEST and REPORT
  
  Revision  Changes    Path
  1.79      +25 -0     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.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- TestRun.pm	31 Dec 2001 06:18:52 -0000	1.78
  +++ TestRun.pm	31 Dec 2001 08:39:48 -0000	1.79
  @@ -3,6 +3,7 @@
   use strict;
   use warnings FATAL => 'all';
   
  +use Apache::Test ();
   use Apache::TestConfig ();
   use Apache::TestConfigC ();
   use Apache::TestRequest ();
  @@ -739,5 +740,29 @@
       Apache::TestConfig->usage;
       1;
   }
  +
  +# generate t/TEST script (or a different filename) which will drive
  +# Apache::TestRun
  +sub generate_script {
  +    my ($class, $file) = @_;
  +
  +    $file ||= catfile 't', 'TEST';
  +
  +    my $content = <<'EOM';
  +use strict;
  +use warnings FATAL => 'all';
  +
  +use FindBin;
  +use lib "$FindBin::Bin/../Apache-Test/lib";
  +
  +use Apache::TestRun ();
  +
  +Apache::TestRun->new->run(@ARGV);
  +EOM
  +
  +    Apache::Test::config()->write_perlscript($file, $content);
  +
  +}
  +
   
   1;
  
  
  
  1.4       +26 -0     httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm
  
  Index: TestRunPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestRunPerl.pm	16 Oct 2001 20:30:57 -0000	1.3
  +++ TestRunPerl.pm	31 Dec 2001 08:39:48 -0000	1.4
  @@ -5,6 +5,8 @@
   
   use Apache::TestRun ();
   
  +use File::Spec::Functions qw(catfile);
  +
   #subclass of Apache::TestRun that configures mod_perlish things
   use vars qw(@ISA);
   @ISA = qw(Apache::TestRun);
  @@ -36,5 +38,29 @@
       $self->SUPER::refresh;
       $self->configure_modperl;
   }
  +
  +# generate t/TEST script (or a different filename) which will drive
  +# Apache::TestRunPerl
  +sub generate_script {
  +    my ($class, $file) = @_;
  +
  +    $file ||= catfile 't', 'TEST';
  +
  +    my $content = <<'EOM';
  +use strict;
  +use warnings FATAL => 'all';
  +
  +use FindBin;
  +use lib "$FindBin::Bin/../Apache-Test/lib";
  +
  +use Apache::TestRunPerl ();
  +
  +Apache::TestRunPerl->new->run(@ARGV);
  +EOM
  +
  +    Apache::Test::config()->write_perlscript($file, $content);
  +
  +}
  +
   
   1;
  
  
  
  1.2       +27 -0     httpd-test/perl-framework/Apache-Test/lib/Apache/TestSmokePerl.pm
  
  Index: TestSmokePerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestSmokePerl.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSmokePerl.pm	11 Dec 2001 05:12:28 -0000	1.1
  +++ TestSmokePerl.pm	31 Dec 2001 08:39:48 -0000	1.2
  @@ -3,12 +3,39 @@
   use strict;
   use warnings FATAL => 'all';
   
  +use Apache::Test ();
   use Apache::TestSmoke ();
   use ModPerl::Config ();
   
  +use File::Spec::Functions qw(catfile);
  +
   # a subclass of Apache::TestSmoke that configures mod_perlish things
   use vars qw(@ISA);
   @ISA = qw(Apache::TestSmoke);
  +
  +# generate t/SMOKE script (or a different filename) which will drive
  +# Apache::TestSmokePerl
  +sub generate_script {
  +    my ($class, $file) = @_;
  +
  +    $file ||= catfile 't', 'SMOKE';
  +
  +    my $content = <<'EOM';
  +use strict;
  +use warnings FATAL => 'all';
  +
  +use FindBin;
  +use lib "$FindBin::Bin/../Apache-Test/lib";
  +use lib "$FindBin::Bin/../lib";
  +
  +use Apache::TestSmokePerl ();
  +
  +Apache::TestSmokePerl->new(@ARGV)->run;
  +EOM
  +
  +    Apache::Test::config()->write_perlscript($file, $content);
  +
  +}
   
   sub build_config_as_string {
       my($self) = @_;
  
  
  

Mime
View raw message