summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2014-10-29 14:32:41 +0100
committerMatteo Beccati <mbeccati@php.net>2014-10-29 14:34:48 +0100
commitabfb30dc67dfbfb3d3abaa502faa29ef9d82c459 (patch)
tree8516438f10dec15bab6caeb9e522781dfe913bfe /run-tests.php
parent3e9138e6b5fc48034b669ddb0270368e562b7957 (diff)
downloadphp-git-abfb30dc67dfbfb3d3abaa502faa29ef9d82c459.tar.gz
Don't treat warnings as failures in the junit output
This matches Travis and the actual return code.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php
index 4f29345d9f..17930b29bc 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -2724,7 +2724,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';
@@ -2738,6 +2738,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";