[Piglit] [RFC 20/30] all.py: use profile.test_list instead of profile.test for glean tests

Dylan Baker baker.dylan.c at gmail.com
Tue Jan 27 14:58:54 PST 2015


These tests are already formated using grouptools, with no intermediate
tree structures. Moving them to the flat test list reduces the amount of
time spent migrating them to test_list before running tests.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/all.py      |  4 ++--
 tests/llvmpipe.py | 15 ++++++++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 1fc0847..14b360a 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -355,8 +355,8 @@ for pairs in [(['glsl1'], glean_glsl_tests),
               (['vertProg1'], glean_vp_tests)]:
     for prefix, name in itertools.product(*pairs):
         groupname = grouptools.join('glean', '{0}-{1}'.format(prefix, name))
-        profile.tests[groupname] = GleanTest(prefix)
-        profile.tests[groupname].env['PIGLIT_TEST'] = name
+        profile.test_list[groupname] = GleanTest(prefix)
+        profile.test_list[groupname].env['PIGLIT_TEST'] = name
 
 def add_fbo_formats_tests(path, extension, suffix=''):
     path = grouptools.from_path(path)
diff --git a/tests/llvmpipe.py b/tests/llvmpipe.py
index d25c9af..6b5b84f 100644
--- a/tests/llvmpipe.py
+++ b/tests/llvmpipe.py
@@ -1,14 +1,23 @@
 # -*- coding: utf-8 -*-
 
-import os.path
 import platform
+
+from framework.grouptools import join
 from tests.gpu import profile
 
 __all__ = ['profile']
 
+
+def remove(key):
+    try:
+        del profile.test_list[key]
+    except KeyError:
+        pass
+
+
 # These take too long or too much memory
-profile.tests['glean'].pop('pointAtten', None)
-profile.tests['glean'].pop('texCombine', None)
+remove(join('glean', 'pointAtten'))
+remove(join('glean', 'texCombine'))
 profile.tests['spec']['!OpenGL 1.1'].pop('streaming-texture-leak', None)
 profile.tests['spec']['!OpenGL 1.1'].pop('max-texture-size', None)
 
-- 
2.2.2



More information about the Piglit mailing list