httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestMM.pm
Date Tue, 12 Oct 2004 12:55:26 GMT
geoff       2004/10/12 05:55:26

  Modified:    perl-framework/Apache-Test Changes
               perl-framework/Apache-Test/lib/Apache TestMM.pm
  Log:
  add 'testcover' make target for running tests with Devel::Cover
  
  Revision  Changes    Path
  1.175     +3 -0      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.174
  retrieving revision 1.175
  diff -u -r1.174 -r1.175
  --- Changes	12 Oct 2004 12:32:34 -0000	1.174
  +++ Changes	12 Oct 2004 12:55:26 -0000	1.175
  @@ -8,6 +8,9 @@
   
   =item 1.15-dev
   
  +add 'testcover' make target for running tests with Devel::Cover
  +[Geoffrey Young]
  +
   
   
   
  
  
  
  1.39      +25 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm
  
  Index: TestMM.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- TestMM.pm	15 Sep 2004 23:55:31 -0000	1.38
  +++ TestMM.pm	12 Oct 2004 12:55:26 -0000	1.39
  @@ -57,7 +57,31 @@
   PASSENV = $env
   EOF
   
  -    return $preamble . <<'EOF';
  +    my $cover;
  +
  +    if (eval { require Devel::Cover }) {
  +                                                                                      
                                      
  +        my $atdir = File::Spec->catfile($ENV{HOME}, '.apache-test');
  +
  +        $cover = <<"EOF"
  +
  +testcover :
  +	-\@cover -delete
  +	-\@HARNESS_PERL_SWITCHES=-MDevel::Cover=+inc,$atdir \
  +	APACHE_TEST_EXTRA_ARGS=-one-process \$(MAKE) test
  +	-\@cover
  +EOF
  +    }
  +    else {
  +
  +        $cover = <<'EOF';
  +                                                                                      
                                      
  +testcover :
  +	@echo "Cannot run testcover action unless Devel::Cover is installed"
  +EOF
  +    }
  +
  +    return $preamble . <<'EOF' . $cover;
   TEST_VERBOSE = 0
   TEST_FILES =
   
  
  
  

Mime
View raw message