[Piglit] [RFC 13/30] shader_test.py: convert add_shader_test_dir to use a flat group

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


Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/test/shader_test.py        |   9 +-
 framework/tests/shader_test_tests.py |   7 +-
 tests/all.py                         | 163 ++++++++++++++++++-----------------
 tests/quick.py                       |   5 +-
 4 files changed, 96 insertions(+), 88 deletions(-)

diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py
index 5fd2de7..a05abea 100644
--- a/framework/test/shader_test.py
+++ b/framework/test/shader_test.py
@@ -100,8 +100,10 @@ class ShaderTestParserException(Exception):
     pass
 
 
-def add_shader_test_dir(group, startdir):
+def add_shader_test_dir(profile, group, startdir):
     """Add all shader tests in a directory to the given group."""
+    assert isinstance(group, basestring)
+
     for dirpath, _, filenames in os.walk(startdir):
         for filename in filenames:
             testname, ext = os.path.splitext(filename)
@@ -109,6 +111,9 @@ def add_shader_test_dir(group, startdir):
                 continue
 
             lgroup = grouptools.join(
+                group,
                 grouptools.from_path(os.path.relpath(dirpath, startdir)),
                 testname)
-            group[lgroup] = ShaderTest(os.path.join(dirpath, filename))
+
+            profile.test_list[lgroup] = \
+                ShaderTest(os.path.join(dirpath, filename))
diff --git a/framework/tests/shader_test_tests.py b/framework/tests/shader_test_tests.py
index bc4a5f5..9f44f70 100644
--- a/framework/tests/shader_test_tests.py
+++ b/framework/tests/shader_test_tests.py
@@ -77,7 +77,12 @@ def test_parse_gles3_test():
 
 def test_add_shader_test_dir():
     """ Test that add_shader_test_dir works """
-    testm.add_shader_test_dir({}, 'tests/spec/glsl-es-3.00/execution')
+    class Profile(object):  # pylint: disable=too-few-public-methods
+        def __init__(self):
+            self.test_list = {}
+
+    testm.add_shader_test_dir(Profile(), 'tests/spec/glsl-es-3.00',
+                              'tests/spec/glsl-es-3.00/execution')
 
 
 def test_add_fbo():
diff --git a/tests/all.py b/tests/all.py
index 4267a88..6c05dc6 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -17,6 +17,11 @@ from framework.test import (PiglitGLTest, GleanTest,
 from py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
 
 
+def shader_test_dir(group, startdir):
+    """Wrapper for add_shader_test_dir that provides the profile element."""
+    add_shader_test_dir(profile, group, startdir)
+
+
 def add_single_param_test_set(group, name, *params):
     for param in params:
         group['{}-{}'.format(name, param)] = PiglitGLTest([name, param])
@@ -390,8 +395,8 @@ def add_getactiveuniform_count(group, name, expected):
         run_concurrent=True)
 
 shaders = profile.tests['shaders']
-add_shader_test_dir(shaders,
-                    os.path.join(TESTS_DIR, 'shaders'))
+shader_test_dir('shaders',
+                os.path.join(TESTS_DIR, 'shaders'))
 add_concurrent_test(shaders, ['activeprogram-bad-program'])
 add_concurrent_test(shaders, ['activeprogram-get'])
 add_concurrent_test(shaders, ['attribute0'])
@@ -1062,8 +1067,8 @@ spec[grouptools.join('!OpenGL 4.4', 'tex-errors')] = PiglitGLTest(['tex-errors']
 import_glsl_parser_tests(spec['glsl-es-1.00'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-es-1.00'),
                          ['compiler'])
-add_shader_test_dir(spec['glsl-es-1.00']['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-es-1.00', 'execution'))
+shader_test_dir('spec/glsl-es-1.00/execution',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-es-1.00', 'execution'))
 spec['glsl-es-1.00']['built-in constants'] = PiglitGLTest(
     ['built-in-constants_gles2',
      os.path.join(TESTS_DIR, 'spec', 'glsl-es-1.00', 'minimum-maximums.txt')],
@@ -1073,10 +1078,10 @@ spec['glsl-es-1.00']['built-in constants'] = PiglitGLTest(
 import_glsl_parser_tests(spec['glsl-1.10'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-1.10'),
                          ['preprocessor', 'compiler'])
-add_shader_test_dir(spec['glsl-1.10']['linker'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.10', 'linker'))
-add_shader_test_dir(spec['glsl-1.10']['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.10', 'execution'))
+shader_test_dir('spec/glsl-1.10/linker',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.10', 'linker'))
+shader_test_dir('spec/glsl-1.10/execution',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.10', 'execution'))
 add_concurrent_test(spec['glsl-1.10']['execution'], ['glsl-render-after-bad-attach'])
 add_concurrent_test(spec['glsl-1.10']['execution'], ['glsl-1.10-fragdepth'])
 for mode in ['fixed', 'pos_clipvert', 'clipvert_pos']:
@@ -1105,10 +1110,10 @@ import_glsl_parser_tests(spec['glsl-1.20'],
 import_glsl_parser_tests(spec['glsl-1.20'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-1.20'),
                          ['compiler'])
-add_shader_test_dir(spec['glsl-1.20']['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.20', 'execution'))
-add_shader_test_dir(spec['glsl-1.20']['linker'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.20', 'linker'))
+shader_test_dir('spec/glsl-1.20/execution',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.20', 'execution'))
+shader_test_dir('spec/glsl-1.20/linker',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.20', 'linker'))
 
 def add_recursion_test(group, name):
     # When the recursion tests fail it is usually because the GLSL
@@ -1224,8 +1229,8 @@ add_concurrent_test(spec['glsl-1.30']['execution'], ['texelFetch', 'fs', 'sample
 add_concurrent_test(spec['glsl-1.30']['execution'], ['fs-texelFetch-2D'])
 add_concurrent_test(spec['glsl-1.30']['execution'], ['fs-texelFetchOffset-2D'])
 add_concurrent_test(spec['glsl-1.30']['execution'], ['fs-textureOffset-2D'])
-add_shader_test_dir(spec['glsl-1.30']['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.30', 'execution'))
+shader_test_dir('spec/glsl-1.30/execution',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.30', 'execution'))
 add_plain_test(spec['glsl-1.30']['linker']['clipping'], ['mixing-clip-distance-and-clip-vertex-disallowed'])
 add_plain_test(spec['glsl-1.30']['execution']['clipping'], ['max-clip-distances'])
 for arg in ['vs_basic', 'vs_xfb', 'vs_fbo', 'fs_basic', 'fs_fbo']:
@@ -1422,8 +1427,8 @@ add_concurrent_test(spec['glsl-1.30']['execution'], ['tex-miplevel-selection', '
 import_glsl_parser_tests(spec['glsl-1.40'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-1.40'),
                          ['compiler'])
-add_shader_test_dir(spec['glsl-1.40'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.40'))
+shader_test_dir('spec/glsl-1.40',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.40'))
 spec['glsl-1.40']['execution']['tf-no-position'] = PiglitGLTest(['glsl-1.40-tf-no-position'], run_concurrent=True)
 spec['glsl-1.40']['built-in constants'] = PiglitGLTest(
     ['built-in-constants',
@@ -1459,8 +1464,8 @@ for stage in ['vs', 'gs', 'fs']:
 import_glsl_parser_tests(spec['glsl-1.50'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-1.50'),
                          ['compiler'])
-add_shader_test_dir(spec['glsl-1.50'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-1.50'))
+shader_test_dir('spec/glsl-1.50',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-1.50'))
 spec['glsl-1.50']['execution']['interface-blocks-api-access-members'] = PiglitGLTest(['glsl-1.50-interface-blocks-api-access-members'], run_concurrent=True)
 spec['glsl-1.50']['execution']['get-active-attrib-array'] = PiglitGLTest(['glsl-1.50-get-active-attrib-array'], run_concurrent=True)
 spec['glsl-1.50']['execution']['vs-input-arrays'] = PiglitGLTest(['glsl-1.50-vs-input-arrays'], run_concurrent=True)
@@ -1536,15 +1541,15 @@ spec['glsl-3.30']['built-in constants'] = PiglitGLTest(
 import_glsl_parser_tests(spec['glsl-3.30'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-3.30'),
                          ['compiler'])
-add_shader_test_dir(spec['glsl-3.30'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-3.30'))
+shader_test_dir('spec/glsl-3.30',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-3.30'))
 
 # Group spec/glsl-es-3.00
 import_glsl_parser_tests(spec['glsl-es-3.00'],
                          os.path.join(TESTS_DIR, 'spec', 'glsl-es-3.00'),
                          ['compiler'])
-add_shader_test_dir(spec['glsl-es-3.00'],
-                    os.path.join(TESTS_DIR, 'spec', 'glsl-es-3.00'))
+shader_test_dir('spec/glsl-es-3.00',
+                os.path.join(TESTS_DIR, 'spec', 'glsl-es-3.00'))
 add_concurrent_test(spec['glsl-es-3.00']['execution'], ['varying-struct-centroid_gles3'])
 spec['glsl-es-3.00']['built-in constants'] = PiglitGLTest(
     ['built-in-constants_gles3',
@@ -1558,23 +1563,23 @@ profile.test_list[grouptools.join('spec', 'AMD_performance_monitor', 'measure')]
 import_glsl_parser_tests(spec['AMD_conservative_depth'],
                          os.path.join(TESTS_DIR, 'spec', 'amd_conservative_depth'),
                          [''])
-add_shader_test_dir(spec['AMD_conservative_depth'],
-                    os.path.join(TESTS_DIR, 'spec', 'amd_conservative_depth'))
+shader_test_dir('spec/AMD_conservative_depth',
+                os.path.join(TESTS_DIR, 'spec', 'amd_conservative_depth'))
 
 # Group ARB_arrays_of_arrays
 arb_arrays_of_arrays = spec['ARB_arrays_of_arrays']
 import_glsl_parser_tests(arb_arrays_of_arrays,
                          os.path.join(TESTS_DIR, 'spec', 'arb_arrays_of_arrays'),
                          ['compiler'])
-add_shader_test_dir(arb_arrays_of_arrays,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_arrays_of_arrays'))
+shader_test_dir('spec/arb_arrays_of_arrays',
+                os.path.join(TESTS_DIR, 'spec', 'arb_arrays_of_arrays'))
 
 # Group AMD_shader_trinary_minmax
 import_glsl_parser_tests(spec['AMD_shader_trinary_minmax'],
                          os.path.join(TESTS_DIR, 'spec', 'amd_shader_trinary_minmax'),
                          [''])
-add_shader_test_dir(spec['AMD_shader_trinary_minmax'],
-                    os.path.join(TESTS_DIR, 'spec', 'amd_shader_trinary_minmax'))
+shader_test_dir('spec/AMD_shader_trinary_minmax',
+                os.path.join(TESTS_DIR, 'spec', 'amd_shader_trinary_minmax'))
 
 # Group ARB_point_sprite
 arb_point_sprite = spec['ARB_point_sprite']
@@ -1595,8 +1600,8 @@ add_concurrent_test(arb_tessellation_shader, ['arb_tessellation_shader-minmax'])
 import_glsl_parser_tests(arb_tessellation_shader,
                          os.path.join(TESTS_DIR, 'spec',
                          'arb_tessellation_shader'), ['compiler'])
-add_shader_test_dir(arb_tessellation_shader,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_tessellation_shader'))
+shader_test_dir('spec/arb_tessellation_shader',
+                os.path.join(TESTS_DIR, 'spec', 'arb_tessellation_shader'))
 
 # Group ARB_texture_multisample
 samplers_atm = ['sampler2DMS', 'isampler2DMS', 'usampler2DMS',
@@ -1735,8 +1740,8 @@ import_glsl_parser_tests(arb_draw_instanced,
                         os.path.join(TESTS_DIR, 'spec', 'arb_draw_instanced'),
                         [''])
 
-add_shader_test_dir(arb_draw_instanced,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_draw_instanced', 'execution'))
+shader_test_dir('spec/arb_draw_instanced',
+                os.path.join(TESTS_DIR, 'spec', 'arb_draw_instanced', 'execution'))
 arb_draw_instanced['dlist'] = PiglitGLTest(['arb_draw_instanced-dlist'], run_concurrent=True)
 arb_draw_instanced['elements'] = PiglitGLTest(['arb_draw_instanced-elements'], run_concurrent=True)
 arb_draw_instanced['negative-arrays-first-negative'] = PiglitGLTest(['arb_draw_instanced-negative-arrays-first-negative'], run_concurrent=True)
@@ -1759,8 +1764,8 @@ arb_draw_indirect['gl_VertexID used with glDrawElementsIndirect'] = PiglitGLTest
 
 # Group ARB_fragment_program
 arb_fragment_program = spec['ARB_fragment_program']
-add_shader_test_dir(spec['ARB_fragment_program'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_fragment_program'))
+shader_test_dir('spec/ARB_fragment_program',
+                os.path.join(TESTS_DIR, 'spec', 'arb_fragment_program'))
 arb_fragment_program['minmax'] = PiglitGLTest(['arb_fragment_program-minmax'], run_concurrent=True)
 add_vpfpgeneric(arb_fragment_program, 'fdo30337a')
 add_vpfpgeneric(arb_fragment_program, 'fdo30337b')
@@ -1787,9 +1792,8 @@ add_plain_test(arb_fragment_program, ['trinity-fp1'])
 arb_fragment_program['incomplete-texture-arb_fp'] = PiglitGLTest(['incomplete-texture', 'arb_fp'], run_concurrent=True)
 
 # Group ARB_fragment_program_shadow
-arb_fragment_program_shadow = spec['ARB_fragment_program_shadow']
-add_shader_test_dir(spec['ARB_fragment_program_shadow'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_fragment_program_shadow'))
+shader_test_dir('spec/ARB_fragment_program_shadow',
+                os.path.join(TESTS_DIR, 'spec', 'arb_fragment_program_shadow'))
 
 nv_fragment_program_option = spec['NV_fragment_program_option']
 add_plain_test(nv_fragment_program_option, ['fp-abs-02'])
@@ -1806,9 +1810,8 @@ import_glsl_parser_tests(arb_fragment_coord_conventions,
                                       'arb_fragment_coord_conventions'),
                          ['compiler'])
 
-arb_fragment_layer_viewport = spec['ARB_fragment_layer_viewport']
-add_shader_test_dir(arb_fragment_layer_viewport,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_fragment_layer_viewport'))
+shader_test_dir('arb_fragment_layer_viewport',
+                os.path.join(TESTS_DIR, 'spec', 'arb_fragment_layer_viewport'))
 
 ati_fragment_shader = spec['ATI_fragment_shader']
 add_plain_test(ati_fragment_shader, ['ati-fs-bad-delete'])
@@ -1881,8 +1884,8 @@ add_plain_test(arb_framebuffer_srgb, ['framebuffer-srgb']) # must not be concurr
 add_concurrent_test(arb_framebuffer_srgb, ['arb_framebuffer_srgb-clear'])
 
 arb_gpu_shader5 = spec['ARB_gpu_shader5']
-add_shader_test_dir(arb_gpu_shader5,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_gpu_shader5'))
+shader_test_dir('spec/arb_gpu_shader5',
+                os.path.join(TESTS_DIR, 'spec', 'arb_gpu_shader5'))
 import_glsl_parser_tests(arb_gpu_shader5,
                          os.path.join(TESTS_DIR, 'spec', 'arb_gpu_shader5'),
                          [''])
@@ -1939,23 +1942,23 @@ add_concurrent_test(arb_gpu_shader5, ['arb_gpu_shader5-interpolateAtOffset'])
 add_concurrent_test(arb_gpu_shader5, ['arb_gpu_shader5-interpolateAtOffset-nonconst'])
 
 arb_shader_subroutine = spec['ARB_shader_subroutine']
-add_shader_test_dir(arb_shader_subroutine,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_shader_subroutine'))
+shader_test_dir('spec/arb_shader_subroutine',
+                os.path.join(TESTS_DIR, 'spec', 'arb_shader_subroutine'))
 import_glsl_parser_tests(arb_shader_subroutine,
                          os.path.join(TESTS_DIR, 'spec', 'arb_shader_subroutine'),
                          [''])
 add_concurrent_test(arb_shader_subroutine, ['arb_shader_subroutine-minmax'])
 
 arb_gpu_shader_fp64 = spec['ARB_gpu_shader_fp64']
-add_shader_test_dir(arb_gpu_shader_fp64,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_gpu_shader_fp64'))
+shader_test_dir('spec/arb_gpu_shader_fp64',
+                os.path.join(TESTS_DIR, 'spec', 'arb_gpu_shader_fp64'))
 import_glsl_parser_tests(arb_gpu_shader_fp64,
                     os.path.join(TESTS_DIR, 'spec', 'arb_gpu_shader_fp64'),
                     [''])
 
 arb_texture_query_levels = spec['ARB_texture_query_levels']
-add_shader_test_dir(arb_texture_query_levels,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_texture_query_levels'))
+shader_test_dir('spec/arb_texture_query_levels',
+                os.path.join(TESTS_DIR, 'spec', 'arb_texture_query_levels'))
 import_glsl_parser_tests(arb_texture_query_levels,
                          os.path.join(TESTS_DIR, 'spec', 'arb_texture_query_levels'),
                          [''])
@@ -2078,14 +2081,13 @@ add_plain_test(arb_robustness, ['arb_robustness_client-mem-bounds'])
 #add_plain_test(arb_robustness, ['arb_robustness_draw-vbo-bounds'])
 
 # Group ARB_shader_bit_encoding
-arb_shader_bit_encoding = spec['ARB_shader_bit_encoding']
-add_shader_test_dir(arb_shader_bit_encoding['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_shader_bit_encoding', 'execution'))
+shader_test_dir('spec/arb_shader_bit_encoding/execution',
+                os.path.join(TESTS_DIR, 'spec', 'arb_shader_bit_encoding', 'execution'))
 
 # Group ARB_shader_texture_lod
 arb_shader_texture_lod = spec['ARB_shader_texture_lod']
-add_shader_test_dir(arb_shader_texture_lod['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_shader_texture_lod', 'execution'))
+shader_test_dir('spec/arb_shader_texture_lod/execution',
+                os.path.join(TESTS_DIR, 'spec', 'arb_shader_texture_lod', 'execution'))
 add_plain_test(arb_shader_texture_lod['execution'], ['arb_shader_texture_lod-texgrad'])
 add_plain_test(arb_shader_texture_lod['execution'], ['arb_shader_texture_lod-texgradcube'])
 
@@ -2138,8 +2140,8 @@ arb_shading_language_420pack = spec['ARB_shading_language_420pack']
 import_glsl_parser_tests(arb_shading_language_420pack,
                          os.path.join(TESTS_DIR, 'spec', 'arb_shading_language_420pack'),
                          ['compiler'])
-add_shader_test_dir(arb_shading_language_420pack['execution'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_shading_language_420pack', 'execution'))
+shader_test_dir('spec/arb_shading_language_420pack/execution',
+                os.path.join(TESTS_DIR, 'spec', 'arb_shading_language_420pack', 'execution'))
 spec['ARB_shading_language_420pack']['built-in constants'] = PiglitGLTest(
     ['built-in-constants',
      os.path.join(TESTS_DIR, 'spec', 'arb_shading_language_420pack', 'minimum-maximums.txt')],
@@ -2166,8 +2168,8 @@ arb_explicit_uniform_location = spec['ARB_explicit_uniform_location']
 import_glsl_parser_tests(arb_explicit_uniform_location,
                          os.path.join(TESTS_DIR, 'spec', 'arb_explicit_uniform_location'),
                          [''])
-add_shader_test_dir(arb_explicit_uniform_location,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_explicit_uniform_location'))
+shader_test_dir('spec/arb_explicit_uniform_location',
+                os.path.join(TESTS_DIR, 'spec', 'arb_explicit_uniform_location'))
 add_plain_test(arb_explicit_uniform_location, ['arb_explicit_uniform_location-minmax'])
 add_plain_test(arb_explicit_uniform_location, ['arb_explicit_uniform_location-boundaries'])
 add_plain_test(arb_explicit_uniform_location, ['arb_explicit_uniform_location-array-elements'])
@@ -2197,14 +2199,13 @@ arb_texture_buffer_range['errors'] = PiglitGLTest(['arb_texture_buffer_range-err
 arb_texture_buffer_range['ranges'] = PiglitGLTest(['arb_texture_buffer_range-ranges'], run_concurrent=True)
 arb_texture_buffer_range['ranges-2'] = PiglitGLTest(['arb_texture_buffer_range-ranges-2'], run_concurrent=True)
 
-arb_texture_query_lod = spec['ARB_texture_query_lod']
-add_shader_test_dir(arb_texture_query_lod,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_texture_query_lod'))
+shader_test_dir('spec/arb_texture_query_lod',
+                os.path.join(TESTS_DIR, 'spec', 'arb_texture_query_lod'))
 
 arb_texture_rectangle = spec['ARB_texture_rectangle']
 add_texwrap_target_tests(arb_texture_rectangle, 'RECT')
-add_shader_test_dir(arb_texture_rectangle,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_texture_rectangle'))
+shader_test_dir('spec/arb_texture_rectangle',
+                os.path.join(TESTS_DIR, 'spec', 'arb_texture_rectangle'))
 add_msaa_visual_plain_tests(arb_texture_rectangle, ['copyteximage', 'RECT'])
 add_concurrent_test(arb_texture_rectangle, ['1-1-linear-texture'])
 add_plain_test(arb_texture_rectangle, ['texrect-many'])
@@ -2778,8 +2779,8 @@ add_concurrent_test(ext_texture_array, ['fbo-generatemipmap-array', 'RGB9_E5'])
 add_concurrent_test(ext_texture_array, ['fbo-generatemipmap-array', 'S3TC_DXT1'])
 spec['EXT_texture_array']['maxlayers'] = PiglitGLTest(['ext_texture_array-maxlayers'], run_concurrent=True)
 spec['EXT_texture_array']['gen-mipmap'] = PiglitGLTest(['ext_texture_array-gen-mipmap'], run_concurrent=True)
-add_shader_test_dir(ext_texture_array,
-                    os.path.join(TESTS_DIR, 'spec', 'ext_texture_array'))
+shader_test_dir('spec/ext_texture_array',
+                os.path.join(TESTS_DIR, 'spec', 'ext_texture_array'))
 add_msaa_visual_plain_tests(ext_texture_array, ['copyteximage', '1D_ARRAY'])
 add_msaa_visual_plain_tests(ext_texture_array, ['copyteximage', '2D_ARRAY'])
 add_plain_test(ext_texture_array, ['fbo-array'])
@@ -2917,8 +2918,8 @@ add_texwrap_format_tests(ext_texture_integer, 'GL_EXT_texture_integer')
 add_plain_test(ext_texture_integer, ['fbo-integer'])
 
 arb_texture_rg = spec['ARB_texture_rg']
-add_shader_test_dir(arb_texture_rg,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_texture_rg', 'execution'))
+shader_test_dir('spec/arb_texture_rg',
+                os.path.join(TESTS_DIR, 'spec', 'arb_texture_rg', 'execution'))
 add_fbo_formats_tests(grouptools.join('spec', 'ARB_texture_rg'), 'GL_ARB_texture_rg')
 add_fbo_formats_tests(grouptools.join('spec', 'ARB_texture_rg'), 'GL_ARB_texture_rg-float', '-float')
 # unsupported for int yet
@@ -3175,8 +3176,8 @@ arb_uniform_buffer_object = spec['ARB_uniform_buffer_object']
 import_glsl_parser_tests(spec['ARB_uniform_buffer_object'],
                          os.path.join(TESTS_DIR, 'spec', 'arb_uniform_buffer_object'),
                          [''])
-add_shader_test_dir(spec['ARB_uniform_buffer_object'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_uniform_buffer_object'))
+shader_test_dir('spec/ARB_uniform_buffer_object',
+                os.path.join(TESTS_DIR, 'spec', 'arb_uniform_buffer_object'))
 arb_uniform_buffer_object['bindbuffer-general-point'] = PiglitGLTest(['arb_uniform_buffer_object-bindbuffer-general-point'], run_concurrent=True)
 arb_uniform_buffer_object['buffer-targets'] = PiglitGLTest(['arb_uniform_buffer_object-buffer-targets'], run_concurrent=True)
 arb_uniform_buffer_object['bufferstorage'] = PiglitGLTest(['arb_uniform_buffer_object-bufferstorage'], run_concurrent=True)
@@ -3269,8 +3270,8 @@ ext_fog_coord = spec['EXT_fog_coord']
 add_plain_test(ext_fog_coord, ['ext_fog_coord-modes'])
 
 ext_shader_integer_mix = spec['EXT_shader_integer_mix']
-add_shader_test_dir(spec['EXT_shader_integer_mix'],
-                    os.path.join(TESTS_DIR, 'spec', 'ext_shader_integer_mix'))
+shader_test_dir('spec/EXT_shader_integer_mix',
+                os.path.join(TESTS_DIR, 'spec', 'ext_shader_integer_mix'))
 
 nv_texture_barrier = spec['NV_texture_barrier']
 add_plain_test(nv_texture_barrier, ['blending-in-shader'])
@@ -3423,8 +3424,8 @@ add_concurrent_test(arb_copy_image, ['arb_copy_image-formats', '--samples=8'])
 
 arb_cull_distance = spec['arb_cull_distance']
 add_concurrent_test(arb_cull_distance, ['arb_cull_distance-max-distances'])
-add_shader_test_dir(arb_cull_distance,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_cull_distance'))
+shader_test_dir(grouptools.join('spec', 'arb_cull_distance'),
+                os.path.join(TESTS_DIR, 'spec', 'arb_cull_distance'))
 
 arb_half_float_vertex = spec['ARB_half_float_vertex']
 add_plain_test(arb_half_float_vertex, ['draw-vertices-half-float'])
@@ -3518,8 +3519,8 @@ add_concurrent_test(arb_geometry_shader4, ['arb_geometry_shader4-program-paramet
 add_concurrent_test(arb_geometry_shader4, ['arb_geometry_shader4-vertices-in'])
 for mode in ['1', 'tf 1', 'max', 'tf max']:
     add_concurrent_test(arb_geometry_shader4, ['arb_geometry_shader4-program-parameter-vertices-out', mode])
-add_shader_test_dir(spec['ARB_geometry_shader4'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_geometry_shader4'))
+shader_test_dir('spec/ARB_geometry_shader4',
+                os.path.join(TESTS_DIR, 'spec', 'arb_geometry_shader4'))
 import_glsl_parser_tests(spec['ARB_geometry_shader4'],
                          os.path.join(TESTS_DIR, 'spec', 'arb_geometry_shader4'),
                          ['compiler'])
@@ -3529,8 +3530,8 @@ arb_compute_shader['api_errors'] = PiglitGLTest(['arb_compute_shader-api_errors'
 arb_compute_shader['minmax'] = PiglitGLTest(['arb_compute_shader-minmax'], run_concurrent=True)
 arb_compute_shader[grouptools.join('compiler', 'work_group_size_too_large')] = \
     PiglitGLTest(['arb_compute_shader-work_group_size_too_large'], run_concurrent=True)
-add_shader_test_dir(spec['ARB_compute_shader'],
-                    os.path.join(TESTS_DIR, 'spec', 'arb_compute_shader'))
+shader_test_dir('spec/ARB_compute_shader',
+                os.path.join(TESTS_DIR, 'spec', 'arb_compute_shader'))
 import_glsl_parser_tests(spec['ARB_compute_shader'],
                          os.path.join(TESTS_DIR, 'spec', 'arb_compute_shader'),
                          ['compiler'])
@@ -3585,8 +3586,8 @@ add_plain_test(hiz, ['hiz-stencil-test-window-depth0'])
 add_plain_test(hiz, ['hiz-stencil-test-window-depth1'])
 
 fast_color_clear = profile.tests['fast_color_clear']
-add_shader_test_dir(fast_color_clear,
-                    os.path.join(TESTS_DIR, 'fast_color_clear'))
+shader_test_dir('fast_color_clear',
+                os.path.join(TESTS_DIR, 'fast_color_clear'))
 for subtest in ('sample', 'read_pixels', 'blit', 'copy'):
     for buffer_type in ('rb', 'tex'):
         if subtest == 'sample' and buffer_type == 'rb':
@@ -4132,7 +4133,7 @@ for tex_format in ('rgb8', 'srgb8', 'rgba8', 'srgb8-alpha8', 'r11', 'rg11', 'rgb
 add_concurrent_test(arb_es3_compatibility, ['es3-primrestart-fixedindex'])
 add_concurrent_test(arb_es3_compatibility, ['es3-drawarrays-primrestart-fixedindex'])
 
-add_shader_test_dir(spec, os.path.join(GENERATED_TESTS_DIR, 'spec'))
+shader_test_dir('spec', os.path.join(GENERATED_TESTS_DIR, 'spec'))
 import_glsl_parser_tests(profile.tests, GENERATED_TESTS_DIR, ['spec'])
 
 arb_shader_atomic_counters = spec['ARB_shader_atomic_counters']
@@ -4154,8 +4155,8 @@ arb_shader_atomic_counters['unused-result'] = PiglitGLTest(['arb_shader_atomic_c
 arb_shader_atomic_counters['respecify-buffer'] = PiglitGLTest(['arb_shader_atomic_counters-respecify-buffer'], run_concurrent=True)
 
 arb_derivative_control = spec['ARB_derivative_control']
-add_shader_test_dir(arb_derivative_control,
-                    os.path.join(TESTS_DIR, 'spec', 'arb_derivative_control'))
+shader_test_dir('spec/arb_derivative_control',
+                os.path.join(TESTS_DIR, 'spec', 'arb_derivative_control'))
 import_glsl_parser_tests(arb_derivative_control,
                          os.path.join(TESTS_DIR, 'spec', 'arb_derivative_control'),
                          [''])
diff --git a/tests/quick.py b/tests/quick.py
index 8762d7d..a3a550b 100644
--- a/tests/quick.py
+++ b/tests/quick.py
@@ -8,7 +8,4 @@ __all__ = ['profile']
 GleanTest.GLOBAL_PARAMS += ["--quick"]
 
 # These take too long
-del profile.tests['shaders']['glsl-fs-inline-explosion']
-del profile.tests['shaders']['glsl-fs-unroll-explosion']
-del profile.tests['shaders']['glsl-vs-inline-explosion']
-del profile.tests['shaders']['glsl-vs-unroll-explosion']
+profile.filter_tests(lambda n, _: '-explosion' not in n)
-- 
2.2.2



More information about the Piglit mailing list