helly           Fri Dec 30 13:31:49 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src    run-tests.php 
  Log:
  - If user wnats help, don't complain about missing environment
  
http://cvs.php.net/viewcvs.cgi/php-src/run-tests.php?r1=1.226.2.20&r2=1.226.2.21&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.20 php-src/run-tests.php:1.226.2.21
--- php-src/run-tests.php:1.226.2.20    Fri Dec 23 19:40:12 2005
+++ php-src/run-tests.php       Fri Dec 30 13:31:48 2005
@@ -23,7 +23,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: run-tests.php,v 1.226.2.20 2005/12/23 19:40:12 helly Exp $ */
+/* $Id: run-tests.php,v 1.226.2.21 2005/12/30 13:31:48 helly Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -109,8 +109,14 @@
        }
 }
 
-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') && [EMAIL PROTECTED]($php)) {
+               error("invalid PHP executable specified by TEST_PHP_EXECUTABLE  
= " . $php);
+       }
 }
 
 if (getenv('TEST_PHP_LOG_FORMAT')) {
@@ -119,10 +125,6 @@
        $log_format = 'LEOD';
 }
 
-if (function_exists('is_executable') && [EMAIL PROTECTED]($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');
@@ -365,7 +367,7 @@
                                        $html_output = is_resource($html_file);
                                        break;
                                case '--version':
-                                       echo '$Revision: 1.226.2.20 $'."\n";
+                                       echo '$Revision: 1.226.2.21 $'."\n";
                                        exit(1);
                                default:
                                        echo "Illegal switch '$switch' 
specified!\n";

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to