summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-12-30 13:42:20 +0000
committerMarcus Boerger <helly@php.net>2005-12-30 13:42:20 +0000
commit6b35e2ed19d893e847c8cd913bf1e0047f130a2e (patch)
treea3da9e3998d998f1e27661ed146a9e5f11d09619
parent8817b9e11a2503d5cde83c1a2d19313e9eaf76b4 (diff)
downloadphp-git-6b35e2ed19d893e847c8cd913bf1e0047f130a2e.tar.gz
- MFB
-rwxr-xr-xrun-tests.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/run-tests.php b/run-tests.php
index c85fed8552..154562e335 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -109,8 +109,14 @@ if (getenv('TEST_PHP_EXECUTABLE')) {
}
}
-if (empty($php) || !file_exists($php)) {
- error("environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!");
+if ($argc !=2 || ($argv[1] != '-h' && $argv[1] != '-help' && $argv != '--help'))
+{
+ if (empty($php) || !file_exists($php)) {
+ error("environment variable TEST_PHP_EXECUTABLE must be set to specify PHP executable!");
+ }
+ if (function_exists('is_executable') && !@is_executable($php)) {
+ error("invalid PHP executable specified by TEST_PHP_EXECUTABLE = " . $php);
+ }
}
if (getenv('TEST_PHP_LOG_FORMAT')) {
@@ -119,10 +125,6 @@ if (getenv('TEST_PHP_LOG_FORMAT')) {
$log_format = 'LEOD';
}
-if (function_exists('is_executable') && !@is_executable($php)) {
- error("invalid PHP executable specified by TEST_PHP_EXECUTABLE = " . $php);
-}
-
// Check whether a detailed log is wanted.
if (getenv('TEST_PHP_DETAILED')) {
$DETAILED = getenv('TEST_PHP_DETAILED');
@@ -241,6 +243,7 @@ $html_file = null;
$temp_source = null;
$temp_target = null;
$temp_urlbase = null;
+$conf_passed = null;
$cfgtypes = array('show', 'keep');
$cfgfiles = array('skip', 'php');
@@ -298,6 +301,9 @@ if (isset($argc) && $argc > 1) {
case 'a':
$failed_tests_file = fopen($argv[++$i], 'a+t');
break;
+ case 'c':
+ $conf_passed = $argv[++$i];
+ break;
case 'd':
$ini_overwrites[] = $argv[++$i];
break;
@@ -410,6 +416,8 @@ Options:
-a <file> Same as -w but append rather then truncating <file>.
+ -c <file> Look for php.ini in directory <file> or use <file> as ini.
+
-n Pass -n option to the php binary (Do not use a php.ini).
-d foo=bar Pass -d option to the php binary (Define INI entry foo
@@ -464,6 +472,10 @@ HELP;
}
}
}
+ if (strlen($conf_passed))
+ {
+ $pass_options .= " -c '$conf_passed'";
+ }
$test_files = array_unique($test_files);
$test_files = array_merge($test_files, $redir_tests);