httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r128427 - /httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm
Date Thu, 27 Jan 2005 21:32:39 GMT
Author: geoff
Date: Thu Jan 27 13:32:37 2005
New Revision: 128427

URL: http://svn.apache.org/viewcvs?view=rev&rev=128427
Log:
add $_SERVER['SERVER_ROOT']
make sure perl runs and perl and php as php

Modified:
   httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm

Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm?view=diff&rev=128427&p1=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm&r1=128426&p2=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm&r2=128427
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm	(original)
+++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm	Thu Jan 27 13:32:37
2005
@@ -103,20 +103,30 @@
     Test::Harness::runtests($self->get_tests($args, @_));
 }
 
-sub _command {
-    return 'php';
-}
+sub _command_line {
 
-sub _switches {
+    my $self = shift;
+    my $file = shift;
 
-    my $conf = catfile(Apache::Test::vars('serverroot'), 'conf');
+    return $self->SUPER::_command_line($file)
+        unless $file =~ m/\.php$/;
 
+    $file = qq["$file"] if ($file =~ /\s/) && ($file !~ /^".*"$/);
+
+    my $server_root = Apache::Test::vars('serverroot');
+
+    $ENV{SERVER_ROOT} = $server_root;
+
+    my $conf = catfile($server_root, 'conf');
+                                                                                        
                                    
     my $ini = catfile($conf, 'php.ini');
 
     my $switches = join ' ', "--php-ini $ini",
                              "--define include_path=$conf";
 
-    return $switches;
+    my $line = "php $switches $file";
+                                                                                        
                                    
+    return $line;
 }
 
 1;

Mime
View raw message