Piglit has a number of mechanisms for fast skipping, some for GL
features, some for platform support, and some other things. It puts a
nice little message in stdout to let the developer know why it skipped,
but currently that message includes something to the effect of "This is
an unhandled exception", which it isn't it's being handled
appropriately. This patch fixes that.

Signed-off-by: Dylan Baker <[email protected]>
---
 framework/test/base.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/framework/test/base.py b/framework/test/base.py
index a5cac7a..358dfeb 100644
--- a/framework/test/base.py
+++ b/framework/test/base.py
@@ -119,7 +119,9 @@ _SUPPRESS_TIMEOUT = 
bool(os.environ.get('PIGLIT_NO_TIMEOUT', False))
 
 class TestIsSkip(exceptions.PiglitException):
     """Exception raised in is_skip() if the test is a skip."""
-    pass
+    def __init__(self, reason):
+        super(TestIsSkip, self).__init__()
+        self.reason = reason
 
 
 class TestRunError(exceptions.PiglitException):
@@ -254,7 +256,7 @@ class Test(object):
             self.is_skip()
         except TestIsSkip as e:
             self.result.result = 'skip'
-            self.result.out = six.text_type(e)
+            self.result.out = e.reason
             self.result.returncode = None
             return
 
-- 
2.8.2

_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to