summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2005-12-30 13:31:48 +0000
committerMarcus Boerger <helly@php.net>2005-12-30 13:31:48 +0000
commitdc7ecd41ef97ac2421260da4d6114f22f85ff65a (patch)
tree457ed836c131260f6de639d19e83c742805408a4 /run-tests.php
parentbb2955706080d7a650e45641c38e62558669ba79 (diff)
downloadphp-git-dc7ecd41ef97ac2421260da4d6114f22f85ff65a.tar.gz
- If user wnats help, don't complain about missing environment
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/run-tests.php b/run-tests.php
index 02235d248e..ffc63f0446 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');