summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-02-06 09:05:32 -0800
committerDylan Baker <dylan@pnwbakers.com>2018-02-06 09:46:46 -0800
commit99ba901ead85f59305c78b93750a78c823dae43f (patch)
tree0e03460da701f7de498b0b446bc69048d5c52762
parentc4ce2f78d131d0fca7985bd90c60391b71be787b (diff)
framework: work around tests that skip without skipping subtests
This is a workaround for a larger bug, but this is easy to apply and fixes the output of tests. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
-rw-r--r--framework/results.py5
-rw-r--r--framework/test/piglit_test.py11
2 files changed, 16 insertions, 0 deletions
diff --git a/framework/results.py b/framework/results.py
index 2a3e0ba78..b936298c3 100644
--- a/framework/results.py
+++ b/framework/results.py
@@ -183,6 +183,11 @@ class TestResult(object):
return max(six.itervalues(self.subtests))
return self.__result
+ @property
+ def raw_result(self):
+ """Get the result of the test without taking subtests into account."""
+ return self.__result
+
@result.setter
def result(self, new):
try:
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index 950a76245..b6cec71cd 100644
--- a/framework/test/piglit_test.py
+++ b/framework/test/piglit_test.py
@@ -33,6 +33,8 @@ try:
except ImportError:
import json
+import six
+
from framework import core, options
from framework import status
from .base import Test, WindowResizeMixin, ValgrindMixin, TestIsSkip
@@ -85,6 +87,15 @@ class PiglitBaseTest(ValgrindMixin, Test):
self.result.out = '\n'.join(out)
+ # XXX: There are a number of tests that now enumerate their subtests,
+ # but don't properly report skip for all of them when the skip due to a
+ # missing feature. We should fix these tests to do the right thing, but
+ # for the moment this work around will suffice to keep things running.
+ if self.result.raw_result is status.SKIP and self.result.subtests:
+ for k, v in six.iteritems(self.result.subtests):
+ if v is status.NOTRUN:
+ self.result.subtests[k] = status.SKIP
+
super(PiglitBaseTest, self).interpret_result()