[Piglit] [PATCH 2/3] gpu.tests: Filter GLSLParserTest without flattening the group tree.

jfonseca at vmware.com jfonseca at vmware.com
Wed Jun 26 02:48:48 PDT 2013


From: José Fonseca <jfonseca at vmware.com>

---
 tests/gpu.tests | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/tests/gpu.tests b/tests/gpu.tests
index d30f1b9..71cd657 100644
--- a/tests/gpu.tests
+++ b/tests/gpu.tests
@@ -2,11 +2,25 @@
 
 # quick.tests minus compiler tests.
 
-from framework.glsl_parser_test import GLSLParserTest
+import framework.glsl_parser_test
 import os.path
 
 global profile
 
+# Filter out any GLSLParserTest instances, as they're compiler tests.
+def add_glsl_parser_test(group, filepath, test_name):
+    # Dummy version of framework.glsl_parser_test.add_glsl_parser_test
+    if test_name == 'CorrectPreprocess11.frag':
+        # all.tests expects CorrectPreprocess11.frag to exists
+        group[test_name] = GLSLParserTest(filepath)
+    else:
+        # Ignore
+        pass
+
+# This be done before executing the base test list script
+framework.glsl_parser_test.add_glsl_parser_test = add_glsl_parser_test
+
+
 execfile(os.path.dirname(__file__) + '/quick.tests')
 
 # Drop these as they're basically compiler tests and take forever.
@@ -18,10 +32,3 @@ del profile.tests['shaders']['glsl-vs-unroll-explosion']
 # Drop ARB_vertex_program/ARB_fragment_program compiler tests.
 del profile.tests['asmparsertest']
 
-# Flatten the tree of groups now so we can filter out tests more easily.
-profile.flatten_group_hierarchy()
-
-# Filter out any GLSLParserTest instances, as they're compiler tests.
-profile.test_list = dict([(n,t) for (n,t) in profile.test_list.items() if
-                          not isinstance(t, GLSLParserTest)])
-
-- 
1.8.1.2



More information about the Piglit mailing list