[Piglit] [PATCH 24/35] tests/quick: fix filtering of vs_in shader tests

Dylan Baker dylan at pnwbakers.com
Wed Apr 4 22:27:12 UTC 2018


This filter is incorrect as is, in that it can mask tests that it can
remove tests it shouldn't, for example
spec at arb_enhanced_layouts@arb_enhanced_layouts-transform-feedback-layout-qualifiers_vs_interface.
Correcting this is problematic because it changes the way the filter
works and filter will now remove different tests than it did before.

However, it is necessary for a couple of reasons. 1) it's removing tests
it shouldn't, 2) this series is going to split reverse the
shader.py/all.py relationship, and this bug is going to surface there.

The good new is that while this changes the specific tests run, at least
on Intel hardware no failures are removed and no failures are added.
---
 tests/quick.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/quick.py b/tests/quick.py
index 73c4678..2d05d7a 100644
--- a/tests/quick.py
+++ b/tests/quick.py
@@ -17,6 +17,7 @@ import random
 
 from framework import grouptools
 from framework.test import PiglitGLTest
+from framework.test.shader_test import ShaderTest
 from tests.all import profile as _profile
 
 __all__ = ['profile']
@@ -32,8 +33,8 @@ class FilterVsIn(object):
         self.random = random.Random()
         self.random.seed(42)
 
-    def __call__(self, name, _):
-        if 'vs_in' in name:
+    def __call__(self, name, test):
+        if isinstance(test, ShaderTest) and 'vs_in' in grouptools.split(name):
             # 20%
             return self.random.random() <= .2
         return True
-- 
git-series 0.9.1


More information about the Piglit mailing list