You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2003/09/12 04:20:27 UTC

cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestHarness.pm

stas        2003/09/11 19:20:27

  Modified:    perl-framework/Apache-Test/lib/Apache TestHarness.pm
  Log:
  split run() into run() and get_tests() so we can re-use get_tests from
  TestSmoke.pm
  
  Revision  Changes    Path
  1.12      +13 -5     httpd-test/perl-framework/Apache-Test/lib/Apache/TestHarness.pm
  
  Index: TestHarness.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestHarness.pm,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -u -r1.11 -r1.12
  --- TestHarness.pm	20 Oct 2001 00:37:28 -0000	1.11
  +++ TestHarness.pm	12 Sep 2003 02:20:27 -0000	1.12
  @@ -96,14 +96,13 @@
       @new_tests;
   }
   
  -sub run {
  +sub get_tests {
       my $self = shift;
  -    my $args = shift || {};
  +    my $args = shift;
       my @tests = ();
   
       chdir_t();
   
  -    $Test::Harness::verbose ||= $args->{verbose};
       my $ts = $args->{tests} || [];
   
       if (@$ts) {
  @@ -145,11 +144,20 @@
       #dir//foo output is annoying, fix that.
       s:/+:/:g for @tests;
   
  -    if (my(@subtests) = @{ $args->{subtests} }) {
  +    return @tests;
  +}
  +
  +sub run {
  +    my $self = shift;
  +    my $args = shift || {};
  +
  +    $Test::Harness::verbose ||= $args->{verbose};
  +
  +    if (my(@subtests) = @{ $args->{subtests} || [] }) {
           $ENV{HTTPD_TEST_SUBTESTS} = "@subtests";
       }
   
  -    Test::Harness::runtests(@tests);
  +    Test::Harness::runtests($self->get_tests($args, @_));
   }
   
   1;