You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by st...@apache.org on 2002/04/05 21:43:07 UTC

cvs commit: httpd-apreq MANIFEST Makefile.PL

stas        02/04/05 11:43:07

  Modified:    .        MANIFEST Makefile.PL
  Log:
  - add the code that configures the test suite
  
  Revision  Changes    Path
  1.7       +7 -0      httpd-apreq/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/MANIFEST,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MANIFEST	24 Jan 2002 19:51:33 -0000	1.6
  +++ MANIFEST	5 Apr 2002 19:43:07 -0000	1.7
  @@ -47,4 +47,11 @@
   eg/c/testapreq/Makefile.apxs
   eg/perl/cookie.pl
   eg/perl/file_upload.pl
  +t/TEST.PL
  +t/response/TestApReq/big_input.pm
  +t/response/TestApReq/cookie.pm
  +t/response/TestApReq/request.pm
  +t/apreq/big_input.t
  +t/apreq/request.t
  +t/apreq/cookie.t
   
  
  
  
  1.11      +30 -0     httpd-apreq/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Makefile.PL,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Makefile.PL	10 Jan 2001 01:03:41 -0000	1.10
  +++ Makefile.PL	5 Apr 2002 19:43:07 -0000	1.11
  @@ -2,6 +2,28 @@
   use strict;
   use 5.005;
   
  +use lib qw(Apache-Test/lib);
  +use constant HAS_APACHE_TEST => eval {require Apache::Test};
  +# enable 'make test|clean'
  +if (HAS_APACHE_TEST) {
  +    require Apache::TestMM;
  +    Apache::TestMM->import(qw(test clean));
  +} 
  +
  +# prerequisites
  +my %require = (
  +    "Apache::Test" => "", # any version will do
  +);
  +
  +my @scripts = ();
  +
  +if (HAS_APACHE_TEST) {
  +    # accept the configs from command line
  +    Apache::TestMM::filter_args();
  +    Apache::TestMM::generate_script('t/TEST');
  +    push @scripts, 't/TEST';
  +}
  +
   my $myVERSION = MM->parse_version('Request/Request.pm');
   $myVERSION =~ s/(\d\d)(\d\d)$/$1_$2/;
   my $Is_Win32 = ($^O eq "MSWin32") || $ENV{WIN32_TEST}; 
  @@ -43,7 +65,15 @@
   	      'NAME'	 => 'libapreq',
   	      'VERSION' => $myVERSION,
   	      'DIR' => [qw(c Request Cookie)], 
  +              PREREQ_PM => \%require,
  +              clean     => {
  +                            FILES => "@{ clean_files() }",
  +                           },
   	      );
  +
  +sub clean_files {
  +    return [@scripts];
  +}
   
   if ($Is_Win32 and -e $lib) {
     unlink $lib or die "Cannot unlink $lib: $!\n";