[Piglit] [PATCH v3 4/4] framework/backends/junit: Don't let skip hide status changes

Dylan Baker dylan at pnwbakers.com
Wed Aug 31 18:43:12 UTC 2016


Currently a status of skip will cover other changes, which interacts
oddly with the expected_results mechanism. This allowed a skip to hide a
status change, since the expected_result wouldn't be consulted at all.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/backends/junit.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index e71f242..4c9b7af 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -109,9 +109,7 @@ class JUnitWriter(object):
         """Adds the skipped, failure, or error element."""
         res = None
         # If the result is skip, then just add the skipped message and go on
-        if result == 'skip':
-            res = etree.SubElement(element, 'skipped')
-        elif result == 'incomplete':
+        if result == 'incomplete':
             res = etree.SubElement(element, 'failure',
                                    message='Incomplete run.')
         elif result in ['fail', 'dmesg-warn', 'dmesg-fail']:
@@ -138,6 +136,8 @@ class JUnitWriter(object):
             res = etree.SubElement(element, 'failure',
                                    message="expected {}, but got {}".format(
                                        expected_result, result))
+        elif result == 'skip':
+            res = etree.SubElement(element, 'skipped')
 
         # Add the piglit type to the failure result
         if res is not None:
-- 
git-series 0.8.7


More information about the Piglit mailing list