[Piglit] [PATCH] Ignore piglit warning status in JUnit

Mark Janes mark.a.janes at intel.com
Fri Jun 26 10:40:28 PDT 2015

JUnit has no concept of "warning".  It supports the following

 - skip
 - success
 - fail
 - error

dEQP has been found to intermittently emit warnings for passed tests,
and this status is accurately represented in piglit json.  However,
current JUnit transforms them into failures.

A test which emits a warning is more accurately represented as
"success" in JUnit.
 framework/backends/junit.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index 632e516..7499829 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -142,8 +142,7 @@ class JUnitBackend(FileBackend):
             if data['result'] == 'skip':
                 res = etree.SubElement(element, 'skipped')
-            elif data['result'] in ['warn', 'fail', 'dmesg-warn',
-                                    'dmesg-fail']:
+            elif data['result'] in ['fail', 'dmesg-fail']:
                 if expected_result == "failure":
                     err.text += "\n\nWARN: passing test as an expected failure"
                     res = etree.SubElement(element, 'skipped',

More information about the Piglit mailing list