randyk      2003/07/12 16:11:56

  Modified:    t        TEST.win32
  Log:
  remove some blank lines
  
  Revision  Changes    Path
  1.5       +18 -56    modperl/t/TEST.win32
  
  Index: TEST.win32
  ===================================================================
  RCS file: /home/cvs/modperl/t/TEST.win32,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TEST.win32        31 Dec 2000 19:34:16 -0000      1.4
  +++ TEST.win32        12 Jul 2003 23:11:56 -0000      1.5
  @@ -1,27 +1,18 @@
   #AUTHOR: Peter Tillemans <[EMAIL PROTECTED]>
   
   use Cwd;
  -
   use File::Copy;
  -
   use File::Find;
  -
   use Win32::Process;
  -
   use Win32;
  -
   use Config;
  -
   use File::Basename 'dirname';
   
   #
  -
   # Config part
  -
   #
   
   $apache = "apache";
  -
   SEARCH: {
       for my $drive ('c'..'g') {
        for my $p ("program files\\apache", "apache") { 
  @@ -35,7 +26,6 @@
       ExtUtils::MakeMaker->import('prompt');
       $fullapache = prompt("Where is your apache.exe located ?", $fullapache);
   }
  -
   die "Can't find apache.exe!" unless -e $fullapache;
   
   my $ap_path = dirname $fullapache;
  @@ -45,38 +35,30 @@
   
   print "Running tests with:\n";
   print "  perl=$fullperl\n  apache=$fullapache\n";
  -
   $port = 8529;
   
   sub ErrorReport {
  -
  -        print Win32::FormatMessage( Win32::GetLastError() );
  -
  +    print Win32::FormatMessage( Win32::GetLastError() );
   }
   
  -
   #
  -
   # prepare config files
  -
   #
   
   chdir "t/conf";
  -
   copy("httpd.conf-win32", "httpd.conf");# PTI: unless -f httpd.conf;
  -
   chdir "../net";
   
   #copy("config.pl.win32", "config.pl");# PTI: unless -f config.pl;
  -
   chdir "../..";
   
  +#
   #source or binary distribution
  +#
   
   for (qw(src/modules/win32/Release
           src/modules/win32/Debug
  -     win32/modules)) 
  -{    
  +     win32/modules)) {       
       my $dll = "$_/mod_perl.so";
       next unless -e $dll;
       copy $dll, "t/modules/mod_perl.so";
  @@ -84,15 +66,13 @@
   }
   
   #
  -
   # create some bogus files and a place to dump the logfiles
  -
   #
   
   mkdir("/tmp","755") unless -d "/tmp";
   
   for my $d (qw(logs conf)) {
  -     mkdir("t/$d","755") unless -d "t/$d";
  +    mkdir("t/$d","755") unless -d "t/$d";
   }
   
   for my $f (qw(srm.conf access.conf mime.types)) {
  @@ -107,65 +87,47 @@
   $pwd = cwd();
   
   
  -# this is to make sure apache knows which files to take : apparently apache uner 
Win32
  +# this is to make sure apache knows which files to take 
  +#   : apparently apache uner Win32
   
  -# change directories to the installation directory so "./t" references do not work
  +# change directories to the installation directory so "./t" 
  +# references do not work
   
   system "$fullperl -p -i.bak -e \"s#\\./t#$pwd/t#\" t/conf/httpd.conf";
   
   #
  -
   # start ourselves a server to pound on
  -
   #
   
   Win32::Process::Create($HttpdObj,
  -
  -                $fullapache,
  -
  -                "$apache -X -d $pwd/t",
  -
  -                0,
  -
  -                NORMAL_PRIORITY_CLASS,
  -
  -                ".") || die ErrorReport();
  -
  -
  +                       $fullapache,
  +                       "$apache -X -d $pwd/t",
  +                       0,
  +                       NORMAL_PRIORITY_CLASS,
  +                       ".") || die ErrorReport();
   
   print "httpd listening on port $port\n";
  -
   print "will write error_log to: t/logs/mod_perl_error_log\n";
  -
   print "letting apache warm up...\n";
  -
   sleep 2;
  -
   print "done\n";
   
  -
   #
  -
   # Ok, start pounding
  -
   #
   
   system "$fullperl t/TEST @ARGV";
   
  -
  -
  +#
   # stop server again
  -
  +#
   $HttpdObj->Kill(-1);
   
  -
  +#
   # remove traces
  +#
   
   print "letting apache cool down...\n";
  -
   sleep 2;
  -
   find(\&cleanup, '/tmp/');
  -
  -
   sub cleanup {/^(mod_perl|CGItemp)/ && unlink($_)}
  
  
  

Reply via email to