summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2008-01-14 04:34:17 +0000
committerGreg Beaver <cellog@php.net>2008-01-14 04:34:17 +0000
commitc98f8dc30229cc4554a262f4d67020d0de2ff513 (patch)
tree07269d974e50f9309d74c1147ddcf7eff6fe5f7e
parentb24c96616aa38a76470cef272601d4c4fcf3de25 (diff)
downloadphp-git-c98f8dc30229cc4554a262f4d67020d0de2ff513.tar.gz
merge in cgi fixes from PHP_5_3
-rwxr-xr-xrun-tests.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/run-tests.php b/run-tests.php
index 2785294855..111add74d8 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -106,11 +106,22 @@ $environment = isset($_ENV) ? $_ENV : array();
// Require the explicit specification.
// Otherwise we could end up testing the wrong file!
+$php = NULL;
+$php_cgi = NULL;
+
if (getenv('TEST_PHP_EXECUTABLE')) {
$php = getenv('TEST_PHP_EXECUTABLE');
if ($php=='auto') {
$php = $cwd.'/sapi/cli/php';
putenv("TEST_PHP_EXECUTABLE=$php");
+ if (!getenv('TEST_PHP_CGI_EXECUTABLE')) {
+ $php_cgi = $cwd.'/sapi/cgi/php-cgi';
+ if (file_exists($php_cgi)) {
+ putenv("TEST_PHP_CGI_EXECUTABLE=$php_cgi");
+ } else {
+ $php_cgi = NULL;
+ }
+ }
}
$environment['TEST_PHP_EXECUTABLE'] = $php;
}
@@ -181,7 +192,7 @@ $ini_overwrites = array(
function write_information($show_html)
{
- global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test;
+ global $cwd, $php, $php_cgi, $php_info, $user_tests, $ini_overwrites, $pass_options, $exts_to_test;
// Get info from php
$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
@@ -198,6 +209,13 @@ More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
settings2array($ini_overwrites,$info_params);
settings2params($info_params);
$php_info = `$php $pass_options $info_params "$info_file"`;
+ if ($php_cgi && $php != $php_cgi) {
+ $php_info_cgi = `$php_cgi $pass_options $info_params -q "$info_file"`;
+ $php_info_sep = "\n---------------------------------------------------------------------";
+ $php_cgi_info = "$php_info_sep\nPHP : $php_cgi $php_info_cgi$php_info_sep";
+ } else {
+ $php_cgi_info = '';
+ }
@unlink($info_file);
define('TESTED_PHP_VERSION', `$php -r "echo PHP_VERSION;"`);
@@ -221,8 +239,8 @@ More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
// Write test context information.
echo "
=====================================================================
+PHP : $php $php_info $php_cgi_info
CWD : $cwd
-PHP : $php $php_info
Extra dirs : ";
foreach ($user_tests as $test_dir) {
echo "{$test_dir}\n ";