From 8bd58502ca39d65df45c0020a4d5165072397199 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Wed, 29 Oct 2014 14:32:41 +0100 Subject: [PATCH] Don't treat warnings as failures in the junit output This matches Travis and the actual return code. --- run-tests.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index 1b5bcec253..315ae09200 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2718,7 +2718,7 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag if (is_array($type)) { $output_type = $type[0] . 'ED'; - $temp = array_intersect(array('XFAIL', 'FAIL'), $type); + $temp = array_intersect(array('XFAIL', 'FAIL', 'WARN'), $type); $type = reset($temp); } else { $output_type = $type . 'ED'; @@ -2732,6 +2732,9 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag } elseif ('SKIP' == $type) { junit_suite_record($suite, 'test_skip'); $JUNIT['files'][$file_name]['xml'] .= "$escaped_message\n"; + } elseif ('WARN' == $type) { + junit_suite_record($suite, 'test_warn'); + $JUNIT['files'][$file_name]['xml'] .= "$escaped_message\n"; } elseif('FAIL' == $type) { junit_suite_record($suite, 'test_fail'); $JUNIT['files'][$file_name]['xml'] .= "$escaped_details\n"; -- 2.40.0