rasmus                                   Sat, 28 Jan 2012 02:43:31 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=322899

Log:
Simple fix that just quotes the filenames in run-tests to support paths with 
spaces.
Fixes bug #60734

Bug: https://bugs.php.net/60734 (Open) POST, SKIPIF and CLEAN fail if phpt path 
has spaces
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/run-tests.php
    U   php/php-src/branches/PHP_5_4/run-tests.php
    U   php/php-src/trunk/run-tests.php

Modified: php/php-src/branches/PHP_5_3/run-tests.php
===================================================================
--- php/php-src/branches/PHP_5_3/run-tests.php  2012-01-28 02:34:55 UTC (rev 
322898)
+++ php/php-src/branches/PHP_5_3/run-tests.php  2012-01-28 02:43:31 UTC (rev 
322899)
@@ -1518,7 +1518,7 @@
                        if ($JUNIT) {
                                $test_started_at        = microtime(true);
                        }
-                       $output = system_with_timeout("$extra $php 
$pass_options -q $ini_settings -d display_errors=0 $test_skipif", $env);
+                       $output = system_with_timeout("$extra $php 
$pass_options -q $ini_settings -d display_errors=0 \"$test_skipif\"", $env);
                        if ($JUNIT) {
                                $test_finished_at   = microtime(true);
                                $test_execution_time= 
number_format($test_finished_at-$test_started_at, 2);
@@ -1713,7 +1713,7 @@
                }

                save_text($tmp_post, $request);
-               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< $tmp_post";
+               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< \"$tmp_post\"";

        } else if (array_key_exists('POST', $section_text) && 
!empty($section_text['POST'])) {

@@ -1734,7 +1734,7 @@
                $env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
                $env['CONTENT_LENGTH'] = $content_length;

-               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< $tmp_post";
+               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< \"$tmp_post\"";

        } else {

@@ -1792,7 +1792,7 @@
                                settings2params($clean_params);
                                $extra = substr(PHP_OS, 0, 3) !== "WIN" ?
                                        "unset REQUEST_METHOD; unset 
QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset 
REQUEST_METHOD;": "";
-                               system_with_timeout("$extra $php $pass_options 
-q $clean_params $test_clean", $env);
+                               system_with_timeout("$extra $php $pass_options 
-q $clean_params \"$test_clean\"", $env);
                        }

                        if (!$cfg['keep']['clean']) {

Modified: php/php-src/branches/PHP_5_4/run-tests.php
===================================================================
--- php/php-src/branches/PHP_5_4/run-tests.php  2012-01-28 02:34:55 UTC (rev 
322898)
+++ php/php-src/branches/PHP_5_4/run-tests.php  2012-01-28 02:43:31 UTC (rev 
322899)
@@ -1518,7 +1518,7 @@
                        if ($JUNIT) {
                                $test_started_at        = microtime(true);
                        }
-                       $output = system_with_timeout("$extra $php 
$pass_options -q $ini_settings -d display_errors=0 $test_skipif", $env);
+                       $output = system_with_timeout("$extra $php 
$pass_options -q $ini_settings -d display_errors=0 \"$test_skipif\"", $env);
                        if ($JUNIT) {
                                $test_finished_at   = microtime(true);
                                $test_execution_time= 
number_format($test_finished_at-$test_started_at, 2);
@@ -1713,7 +1713,7 @@
                }

                save_text($tmp_post, $request);
-               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< $tmp_post";
+               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< \"$tmp_post\"";

        } else if (array_key_exists('POST', $section_text) && 
!empty($section_text['POST'])) {

@@ -1734,7 +1734,7 @@
                $env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
                $env['CONTENT_LENGTH'] = $content_length;

-               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< $tmp_post";
+               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< \"$tmp_post\"";

        } else {

@@ -1792,7 +1792,7 @@
                                settings2params($clean_params);
                                $extra = substr(PHP_OS, 0, 3) !== "WIN" ?
                                        "unset REQUEST_METHOD; unset 
QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset 
REQUEST_METHOD;": "";
-                               system_with_timeout("$extra $php $pass_options 
-q $clean_params $test_clean", $env);
+                               system_with_timeout("$extra $php $pass_options 
-q $clean_params \"$test_clean\"", $env);
                        }

                        if (!$cfg['keep']['clean']) {

Modified: php/php-src/trunk/run-tests.php
===================================================================
--- php/php-src/trunk/run-tests.php     2012-01-28 02:34:55 UTC (rev 322898)
+++ php/php-src/trunk/run-tests.php     2012-01-28 02:43:31 UTC (rev 322899)
@@ -1521,7 +1521,7 @@
                        if ($JUNIT) {
                                $test_started_at        = microtime(true);
                        }
-                       $output = system_with_timeout("$extra $php 
$pass_options -q $ini_settings -d display_errors=0 $test_skipif", $env);
+                       $output = system_with_timeout("$extra $php 
$pass_options -q $ini_settings -d display_errors=0 \"$test_skipif\"", $env);
                        if ($JUNIT) {
                                $test_finished_at   = microtime(true);
                                $test_execution_time= 
number_format($test_finished_at-$test_started_at, 2);
@@ -1716,7 +1716,7 @@
                }

                save_text($tmp_post, $request);
-               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< $tmp_post";
+               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< \"$tmp_post\"";

        } else if (array_key_exists('POST', $section_text) && 
!empty($section_text['POST'])) {

@@ -1737,7 +1737,7 @@
                $env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
                $env['CONTENT_LENGTH'] = $content_length;

-               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< $tmp_post";
+               $cmd = "$php $pass_options $ini_settings -f \"$test_file\" 2>&1 
< \"$tmp_post\"";

        } else {

@@ -1795,7 +1795,7 @@
                                settings2params($clean_params);
                                $extra = substr(PHP_OS, 0, 3) !== "WIN" ?
                                        "unset REQUEST_METHOD; unset 
QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset 
REQUEST_METHOD;": "";
-                               system_with_timeout("$extra $php $pass_options 
-q $clean_params $test_clean", $env);
+                               system_with_timeout("$extra $php $pass_options 
-q $clean_params \"$test_clean\"", $env);
                        }

                        if (!$cfg['keep']['clean']) {

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

Reply via email to