com php-src: Don't treat warnings as failures in the junit output: run-tests.php
| From: | Matteo Beccati | Date: | Wed, 29 Oct 2014 13:34:58 +0000 |
| Subject: | com php-src: Don't treat warnings as failures in the junit output: run-tests.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82847@lists.php.net to get a copy of this message | ||
Commit: 8bd58502ca39d65df45c0020a4d5165072397199
Author: Matteo Beccati <mbeccati@php.net> Wed, 29 Oct 2014 14:32:41 +0100
Parents: 68b5dd2ba9fa6d8b261d779ce1855221ad241145
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8bd58502ca39d65df45c0020a4d5165072397199
Log:
Don't treat warnings as failures in the junit output
This matches Travis and the actual return code.
Changed paths:
M run-tests.php
Diff:
diff --git a/run-tests.php b/run-tests.php
index 1b5bcec..315ae09 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'] .=
"<skipped>$escaped_message</skipped>\n";
+ } elseif ('WARN' == $type) {
+ junit_suite_record($suite, 'test_warn');
+ $JUNIT['files'][$file_name]['xml'] .=
"<warning>$escaped_message</warning>\n";
} elseif('FAIL' == $type) {
junit_suite_record($suite, 'test_fail');
$JUNIT['files'][$file_name]['xml'] .= "<failure
type='$output_type'
message='$escaped_message'>$escaped_details</failure>\n";