[Piglit] [RFC 15/30] glsl_parser_test.py: remove add_glsl_parser_test

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


This function is used only in import_glsl_parser_tests, and is one line,
a useless abstraction.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/test/glsl_parser_test.py | 8 +-------
 tests/all.py                       | 3 +--
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py
index dd4b161..4ee2794 100644
--- a/framework/test/glsl_parser_test.py
+++ b/framework/test/glsl_parser_test.py
@@ -32,16 +32,10 @@ from .piglit_test import PiglitBaseTest
 
 __all__ = [
     'GLSLParserTest',
-    'add_glsl_parser_test',
     'import_glsl_parser_tests',
 ]
 
 
-def add_glsl_parser_test(group, filepath, test_name):
-    """Add an instance of GLSLParserTest to the given group."""
-    group[test_name] = GLSLParserTest(filepath)
-
-
 def import_glsl_parser_tests(group, basepath, subdirectories):
     """
     Recursively register each shader source file in the given
@@ -69,7 +63,7 @@ def import_glsl_parser_tests(group, basepath, subdirectories):
                     # basepath.
                     testname = grouptools.from_path(
                         os.path.relpath(filepath, basepath))
-                    add_glsl_parser_test(group, filepath, testname)
+                    group[testname] = GLSLParserTest(filepath)
 
 
 class GLSLParserTest(PiglitBaseTest):
diff --git a/tests/all.py b/tests/all.py
index 3556a6a..39cde36 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -11,8 +11,7 @@ import sys
 
 from framework import grouptools
 from framework.profile import TestProfile
-from framework.test import (PiglitGLTest, GleanTest,
-                            add_glsl_parser_test, import_glsl_parser_tests,
+from framework.test import (PiglitGLTest, GleanTest, import_glsl_parser_tests,
                             add_shader_test_dir)
 from py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
 
-- 
2.2.2



More information about the Piglit mailing list