Re: cvs: php4 / run-tests.php

From: Date: Tue, 12 Mar 2002 06:24:25 +0000
Subject: Re: cvs: php4 / run-tests.php
References: 1  Groups: php.cvs php.dev 
Request: Send a blank email to php-dev+get-81052@lists.php.net to get a copy of this message
Yasuo Ohgaki wrote:
yohgaki Tue Mar 12 00:33:12 2002 EDT
  Modified files:                  /php4	run-tests.php   Log:
Do not search php binary in search path, since we are not testing older builds. Print SAPI used.
There is problem with version and sapi name, since it is printing version and sapi of php binary running run-tests.php script. i.e.: php binary running each test script may differ I didn't change the original code, since there is no way to write script in command like php -e "echo PHP_VERSION" or php -e "<?php echo PHP_VERSION ?>" Is there way to do that now? -- Yasuo Ohgaki
Index: php4/run-tests.php diff -u php4/run-tests.php:1.35 php4/run-tests.php:1.36 --- php4/run-tests.php:1.35 Tue Mar 12 00:18:25 2002 +++ php4/run-tests.php Tue Mar 12 00:33:03 2002 @@ -170,9 +170,10 @@
     } elseif (@is_executable("./sapi/cli/php{$ext}")) {
         $php = getcwd() . "/sapi/cli/php{$ext}";
     }
-    if (empty($php)) {
-        $php = in_path("php", $windows_p);
-    }
+// Test result can be bogus, if we use php binary in path. - yohgaki@php.net
+//     if (empty($php)) {
+//         $php = in_path("php", $windows_p);
+//     }
     if (empty($php)) {
         dowriteln("Unable to find PHP executable (php{$ext}).");
         dowriteln("Please build PHP as a CGI executable or make sure it is");
@@ -283,7 +284,8 @@
     dowriteln(sprintf("Tests passed:     %4d (%s%%)", $passed, $passed_pstr));
     dowriteln("=============================");
     dowriteln("Skipped ".sizeof($skipped_extensions)." extensions.");
-    dowriteln("PHP Version: ".phpversion());
+ dowriteln("PHP SAPI: ".PHP_SAPI);
+    dowriteln("PHP Version: ".PHP_VERSION);
} function find_testdirs($dir = '.', $first_pass = true)
-- Yasuo Ohgaki yohgaki@dd.iij4u.or.jp

« previous php.dev (#81052) next »