]> granicus.if.org Git - php/commitdiff
- If user wnats help, don't complain about missing environment
authorMarcus Boerger <helly@php.net>
Fri, 30 Dec 2005 13:31:48 +0000 (13:31 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 30 Dec 2005 13:31:48 +0000 (13:31 +0000)
run-tests.php

index 02235d248e9585b18c75c6e99a66cdeb3b3723ee..ffc63f04468b100b889f948d7c3c334e9daf983a 100755 (executable)
@@ -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');