cvs: php4 / run-tests.php

From: Date: Sat, 02 Mar 2002 02:37:14 +0000
Subject: cvs: php4 / run-tests.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-9560@lists.php.net to get a copy of this message
ssb Fri Mar 1 21:37:14 2002 EDT Modified files: /php4 run-tests.php Log: * work with sapi/cli Index: php4/run-tests.php diff -u php4/run-tests.php:1.33 php4/run-tests.php:1.34 --- php4/run-tests.php:1.33 Thu Feb 28 03:25:27 2002 +++ php4/run-tests.php Fri Mar 1 21:37:13 2002 @@ -161,8 +161,10 @@ } } - if (isset($GLOBALS["TOP_BUILDDIR"]) && @is_executable($GLOBALS["TOP_BUILDDIR"]."/php{$ext}")) { - $php = $GLOBALS["TOP_BUILDDIR"]."/php{$ext}"; + if (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}")) { + $php = $_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}"; + } elseif (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/php{$ext}")) { + $php = $_ENV["TOP_BUILDDIR"]."/php{$ext}"; } elseif (@is_executable("./php{$ext}")) { $php = getcwd() . "/php{$ext}"; } @@ -241,7 +243,7 @@ } } } else { - // $dir = $GLOBALS["TOP_SRCDIR"]; // XXX ??? where should this variable be set? + // $dir = $_ENV["TOP_SRCDIR"]; // XXX ??? where should this variable be set? $dir=str_replace('\\','/',trim(($windows_p ? getenv("TEST_DIR"):pwd))); } if (isset($dir) && $dir) { @@ -376,6 +378,10 @@ function skip_headers($fp) { + // "cli" version of PHP does not output headers + if (php_sapi_name() == "cli") { + return; + } while (!feof($fp)) { if (trim(fgets($fp, 1024)) == "") { break; @@ -538,7 +544,6 @@ delete_tmpfiles(); return TEST_INTERNAL_ERROR; } - //echo $cmd; $cp = popen($cmd, "r"); if (!$cp) { dowriteln("Error: could not execute: $cmd");

« previous php.cvs (#9560) next »