cvs: php4 / run-tests.php

From: Date: Fri, 12 Apr 2002 01:34:07 +0000
Subject: cvs: php4 / run-tests.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11075@lists.php.net to get a copy of this message
yohgaki Thu Apr 11 21:34:07 2002 EDT Modified files: /php4 run-tests.php Log: Enable CGI binary for testing. CGI binary should be used when it's available, since some tests cannot be performed by CLI. (And many of them are just failing now) Fixed SAPI and VERSION output. Index: php4/run-tests.php diff -u php4/run-tests.php:1.39 php4/run-tests.php:1.40 --- php4/run-tests.php:1.39 Mon Mar 18 21:59:15 2002 +++ php4/run-tests.php Thu Apr 11 21:34:06 2002 @@ -161,29 +161,25 @@ } } -/* Lets check for cli first, since the new build system runs the cli sapi, - and this script makes assumptions about the executeable based on things - it determines from *this* instance. If the sapis are not the same, tests - will fail due to silly things like headers not being ignored in the right - places */ +/* We need to check CGI SAPI first since some tests must be skipped when + CLI SAPI is used. CLI SAPI is built always while CGI SAPI is not. + - yohgaki@php.net */ - if (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}")) { - $php = $_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}"; - } elseif (@is_executable("./sapi/cli/php{$ext}")) { - $php = getcwd() . "/sapi/cli/php{$ext}"; - } elseif (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/php{$ext}")) { + if (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}"; - } + } elseif (isset($_ENV["TOP_BUILDDIR"]) && @is_executable($_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}")) { + $php = $_ENV["TOP_BUILDDIR"]."/sapi/cli/php{$ext}"; + } elseif (@is_executable("./sapi/cli/php{$ext}")) { + $php = getcwd() . "/sapi/cli/php{$ext}"; + } // 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"); - dowriteln("available in the PATH environment variable."); exit; } if ($windows_p) { @@ -290,8 +286,8 @@ dowriteln(sprintf("Tests passed: %4d (%s%%)", $passed, $passed_pstr)); dowriteln("============================="); dowriteln("Skipped ".sizeof($skipped_extensions)." extensions."); - $php_bin_info_cmd = "$php -q -f tests/bin-info.inc"; - system($php_bin_info_cmd, $ret); + $php_bin_info_cmd = "$php -q -f ".$_ENV["TOP_BUILDDIR"]."/tests/bin-info.inc"; + system($php_bin_info_cmd); } function find_testdirs($dir = '.', $first_pass = true)

« previous php.cvs (#11075) next »