[Piglit] [PATCH 2/2] glsl_parser_test_tests.py: Add tests to glslparsertest_gles2 checking.

Dylan Baker baker.dylan.c at gmail.com
Mon Aug 3 14:53:03 PDT 2015


These add a few tests that check the glslparser_gles2 detection, we
already have tests for glslparsertest.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/tests/glsl_parser_test_tests.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/framework/tests/glsl_parser_test_tests.py b/framework/tests/glsl_parser_test_tests.py
index 70910b7..201517d 100644
--- a/framework/tests/glsl_parser_test_tests.py
+++ b/framework/tests/glsl_parser_test_tests.py
@@ -327,3 +327,30 @@ def test_good_extensions():
 
         with utils.tempfile(test) as tfile:
             yield check_good_extension, tfile
+
+
+ at utils.nose_generator
+def test_get_glslparsertest_gles2():
+    """GLSLParserTest: gets gles2 binary if glsl is 1.00 or 3.00"""
+
+    @utils.no_error
+    def test(content):
+        with utils.tempfile(content) as f:
+            t = glsl.GLSLParserTest(f)
+            nt.eq_(os.path.basename(t.command[0]), 'glslparsertest_gles2')
+
+    content = textwrap.dedent("""\
+        /*
+         * [config]
+         * expect_result: pass
+         * glsl_version: {}
+         * [end config]
+         */
+        """)
+
+    description = ("test.glsl_parser_test.GLSLParserTest: "
+                   "gets gles2 binary if glsl is {}")
+
+    for version in ['1.00', '3.00']:
+        test.description = description.format(version)
+        yield test, content.format(version)
-- 
2.5.0



More information about the Piglit mailing list