diff options
author | Marcus Boerger <helly@php.net> | 2006-03-11 17:58:24 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2006-03-11 17:58:24 +0000 |
commit | 941d86a204ccae7ea7d75f0945878946a962a620 (patch) | |
tree | a309005889501d520bedd167afe41d921206027c /run-tests.php | |
parent | b80f9567d55b754b08690c5e037c1b0dda85cbad (diff) | |
download | php-git-941d86a204ccae7ea7d75f0945878946a962a620.tar.gz |
- MFH Fix test results with redirected tests
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/run-tests.php b/run-tests.php index 993a2d2635..457ff3a792 100755 --- a/run-tests.php +++ b/run-tests.php @@ -876,9 +876,13 @@ function run_all_tests($test_files, $env, $redir_tested = NULL) { global $test_results, $failed_tests_file, $php, $test_cnt, $test_idx; - foreach($test_files AS $name) + foreach($test_files as $name) { - $index = is_array($name) ? $name[0] : $name; + if ($redir_tested) { + $index = "# $redir_tested: $name"; + } else { + $index = is_array($name) ? "# $name[1]: $name[0]" : $name; + } $test_idx++; $result = run_test($php, $name, $env); if (!is_array($name) && $result != 'REDIR') @@ -886,12 +890,7 @@ function run_all_tests($test_files, $env, $redir_tested = NULL) $test_results[$index] = $result; if ($failed_tests_file && ($result == 'FAILED' || $result == 'WARNED' || $result == 'LEAKED')) { - if ($redir_tested) - { - fwrite($failed_tests_file, "# $redir_tested: $name\n"); - } else { - fwrite($failed_tests_file, "$name\n"); - } + fwrite($failed_tests_file, "$index\n"); } } } |