summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2011-11-26 17:56:43 (GMT)
committerFelipe Pena <felipe@php.net>2011-11-26 17:56:43 (GMT)
commit350325d42a046493913f3458ebb4305a732560d0 (patch)
treec156458554dc0c56ded376ae868e08fd44f8ae26 /run-tests.php
parent06bc6bdc29304a17e730a6c1c69580d1bda14ab6 (diff)
downloadphp-350325d42a046493913f3458ebb4305a732560d0.tar.gz
- Fixed bug #55788 (test redirects should abide SHOW_ONLY_GROUPS in run-tests.php)
patch by: tyrael at php.net
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php20
1 files changed, 15 insertions, 5 deletions
diff --git a/run-tests.php b/run-tests.php
index 2340fa9..e9c6fcb 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -678,7 +678,7 @@ Options:
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_summary()
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'>---&gt; $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'>---&gt; $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)