From 665ee392ef466ac5fe879782b8ac780f4afaf5be Mon Sep 17 00:00:00 2001 From: Zoe Slattery Date: Wed, 31 Dec 2008 17:32:54 +0000 Subject: [PATCH] Fixed bug #46845 Test expected to fail, but pass, don't cause error --- run-tests.php | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/run-tests.php b/run-tests.php index d8f0acc5380..0c2ecb942dc 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1786,10 +1786,16 @@ COMMAND $cmd if (isset($old_php)) { $php = $old_php; } - if (!$leaked && !$failed_headers) { - show_result("PASS", $tested, $tested_file, '', $temp_filenames); - return 'PASSED'; - } + + if (!$leaked && !$failed_headers) { + if (isset($section_text['XFAIL'] )) { + $warn = true; + $info = " (warn: XFAIL section but test passes)"; + }else { + show_result("PASS", $tested, $tested_file, '', $temp_filenames); + return 'PASSED'; + } + } } } else { @@ -1810,9 +1816,14 @@ COMMAND $cmd $php = $old_php; } - if (!$leaked && !$failed_headers) { - show_result("PASS", $tested, $tested_file, '', $temp_filenames); - return 'PASSED'; + if (!$leaked && !$failed_headers) { + if (isset($section_text['XFAIL'] )) { + $warn = true; + $info = " (warn: XFAIL section but test passes)"; + }else { + show_result("PASS", $tested, $tested_file, '', $temp_filenames); + return 'PASSED'; + } } }