httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject svn commit: r153635 - httpd/apreq/branches/multi-env-unstable/win32/Configure.pl
Date Sun, 13 Feb 2005 15:59:34 GMT
Author: randyk
Date: Sun Feb 13 07:59:33 2005
New Revision: 153635

URL: http://svn.apache.org/viewcvs?view=rev&rev=153635
Log:
use Test::Harness to run t/ tests.

Modified:
    httpd/apreq/branches/multi-env-unstable/win32/Configure.pl

Modified: httpd/apreq/branches/multi-env-unstable/win32/Configure.pl
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/win32/Configure.pl?view=diff&r1=153634&r2=153635
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/win32/Configure.pl (original)
+++ httpd/apreq/branches/multi-env-unstable/win32/Configure.pl Sun Feb 13 07:59:33 2005
@@ -34,6 +34,10 @@
 
 check_depends();
 
+my @tests = qw(cookie parsers params version);
+my @test_files = map {catfile('t', "$_.t")} @tests;
+generate_tests($apreq_home, \@tests);
+
 my %apr_libs;
 my %map = (apr => 'libapr.lib', apu => 'libaprutil.lib');
 my $devnull = devnull();
@@ -62,6 +66,7 @@
 PERL=$^X
 RM_F=\$(PERL) -MExtUtils::Command -e rm_f
 DOXYGEN_CONF=\$(APREQ_HOME)\\build\\doxygen.conf.win32
+TEST_FILES = @test_files
 
 END
 
@@ -339,6 +344,20 @@
                 or warn "system @args failed: $?";
         }
     }
+}
+
+sub generate_tests {
+  my ($top, $test_files) = @_;
+  my $t = catdir $top, 't';
+  foreach my $test(@$test_files) {
+    my $file = catfile $t, $test;
+    open my $fh, '>', "$file.t" || die "Cannot open $file.t: $!";
+    print $fh <<"EOT";
+#!$^X
+exec '$file';
+EOT
+    close $fh;
+  }
 }
 
 sub fetch_apxs {



Mime
View raw message