[Piglit] [PATCH] framework: Don't report an error message for fast skipping

Dylan Baker dylan at pnwbakers.com
Wed May 4 20:34:49 UTC 2016

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 <dylanx.c.baker at intel.com>
 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):
         except TestIsSkip as e:
             self.result.result = 'skip'
-            self.result.out = six.text_type(e)
+            self.result.out = e.reason
             self.result.returncode = None

More information about the Piglit mailing list