felipe Sat, 26 Nov 2011 17:56:43 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=319964
Log: - Fixed bug #55788 (test redirects should abide SHOW_ONLY_GROUPS in run-tests.php) patch by: tyrael at php.net Bug: https://bugs.php.net/55788 (Open) test redirects should abide SHOW_ONLY_GROUPS in run-tests.php 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 2011-11-26 17:48:52 UTC (rev 319963) +++ php/php-src/branches/PHP_5_3/run-tests.php 2011-11-26 17:56:43 UTC (rev 319964) @@ -678,7 +678,7 @@ with value 'bar'). -g Comma seperated list of groups to show during test run - (e.x. FAIL,SKIP). + (possible values: PASS, FAIL, XFAIL, SKIP, BORK, WARN, LEAK, REDIRECT). -m Test for memory leaks with Valgrind. @@ -2384,24 +2384,34 @@ function show_redirect_start($tests, $tested, $tested_file) { - global $html_output, $html_file; + global $html_output, $html_file, $line_length, $SHOW_ONLY_GROUPS; if ($html_output) { fwrite($html_file, "<tr><td colspan='3'>---> $tests ($tested [$tested_file]) begin</td></tr>\n"); } - echo "---> $tests ($tested [$tested_file]) begin\n"; + if (!$SHOW_ONLY_GROUPS || in_array('REDIRECT', $SHOW_ONLY_GROUPS)) { + echo "REDIRECT $tests ($tested [$tested_file]) begin\n"; + } else { + // Write over the last line to avoid random trailing chars on next echo + echo str_repeat(" ", $line_length), "\r"; + } } function show_redirect_ends($tests, $tested, $tested_file) { - global $html_output, $html_file; + global $html_output, $html_file, $line_length, $SHOW_ONLY_GROUPS; if ($html_output) { fwrite($html_file, "<tr><td colspan='3'>---> $tests ($tested [$tested_file]) done</td></tr>\n"); } - echo "---> $tests ($tested [$tested_file]) done\n"; + if (!$SHOW_ONLY_GROUPS || in_array('REDIRECT', $SHOW_ONLY_GROUPS)) { + echo "REDIRECT $tests ($tested [$tested_file]) done\n"; + } else { + // Write over the last line to avoid random trailing chars on next echo + echo str_repeat(" ", $line_length), "\r"; + } } function show_test($test_idx, $shortname) Modified: php/php-src/branches/PHP_5_4/run-tests.php =================================================================== --- php/php-src/branches/PHP_5_4/run-tests.php 2011-11-26 17:48:52 UTC (rev 319963) +++ php/php-src/branches/PHP_5_4/run-tests.php 2011-11-26 17:56:43 UTC (rev 319964) @@ -678,7 +678,7 @@ with value 'bar'). -g Comma seperated list of groups to show during test run - (e.x. FAIL,SKIP). + (possible values: PASS, FAIL, XFAIL, SKIP, BORK, WARN, LEAK, REDIRECT). -m Test for memory leaks with Valgrind. @@ -2384,24 +2384,34 @@ function show_redirect_start($tests, $tested, $tested_file) { - global $html_output, $html_file; + global $html_output, $html_file, $line_length, $SHOW_ONLY_GROUPS; if ($html_output) { fwrite($html_file, "<tr><td colspan='3'>---> $tests ($tested [$tested_file]) begin</td></tr>\n"); } - echo "---> $tests ($tested [$tested_file]) begin\n"; + if (!$SHOW_ONLY_GROUPS || in_array('REDIRECT', $SHOW_ONLY_GROUPS)) { + echo "REDIRECT $tests ($tested [$tested_file]) begin\n"; + } else { + // Write over the last line to avoid random trailing chars on next echo + echo str_repeat(" ", $line_length), "\r"; + } } function show_redirect_ends($tests, $tested, $tested_file) { - global $html_output, $html_file; + global $html_output, $html_file, $line_length, $SHOW_ONLY_GROUPS; if ($html_output) { fwrite($html_file, "<tr><td colspan='3'>---> $tests ($tested [$tested_file]) done</td></tr>\n"); } - echo "---> $tests ($tested [$tested_file]) done\n"; + if (!$SHOW_ONLY_GROUPS || in_array('REDIRECT', $SHOW_ONLY_GROUPS)) { + echo "REDIRECT $tests ($tested [$tested_file]) done\n"; + } else { + // Write over the last line to avoid random trailing chars on next echo + echo str_repeat(" ", $line_length), "\r"; + } } function show_test($test_idx, $shortname) Modified: php/php-src/trunk/run-tests.php =================================================================== --- php/php-src/trunk/run-tests.php 2011-11-26 17:48:52 UTC (rev 319963) +++ php/php-src/trunk/run-tests.php 2011-11-26 17:56:43 UTC (rev 319964) @@ -678,7 +678,7 @@ with value 'bar'). -g Comma seperated list of groups to show during test run - (e.x. FAIL,SKIP). + (possible values: PASS, FAIL, XFAIL, SKIP, BORK, WARN, LEAK, REDIRECT). -m Test for memory leaks with Valgrind. @@ -2384,24 +2384,34 @@ function show_redirect_start($tests, $tested, $tested_file) { - global $html_output, $html_file; + global $html_output, $html_file, $line_length, $SHOW_ONLY_GROUPS; if ($html_output) { fwrite($html_file, "<tr><td colspan='3'>---> $tests ($tested [$tested_file]) begin</td></tr>\n"); } - echo "---> $tests ($tested [$tested_file]) begin\n"; + if (!$SHOW_ONLY_GROUPS || in_array('REDIRECT', $SHOW_ONLY_GROUPS)) { + echo "REDIRECT $tests ($tested [$tested_file]) begin\n"; + } else { + // Write over the last line to avoid random trailing chars on next echo + echo str_repeat(" ", $line_length), "\r"; + } } function show_redirect_ends($tests, $tested, $tested_file) { - global $html_output, $html_file; + global $html_output, $html_file, $line_length, $SHOW_ONLY_GROUPS; if ($html_output) { fwrite($html_file, "<tr><td colspan='3'>---> $tests ($tested [$tested_file]) done</td></tr>\n"); } - echo "---> $tests ($tested [$tested_file]) done\n"; + if (!$SHOW_ONLY_GROUPS || in_array('REDIRECT', $SHOW_ONLY_GROUPS)) { + echo "REDIRECT $tests ($tested [$tested_file]) done\n"; + } else { + // Write over the last line to avoid random trailing chars on next echo + echo str_repeat(" ", $line_length), "\r"; + } } function show_test($test_idx, $shortname)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php