[Piglit] [PATCH 47/49] framework/test/glsl_parser_test: Don't error on blank C comments

Dylan Baker dylan at pnwbakers.com
Fri Jul 29 18:39:33 UTC 2016


Currently if a C style comment has a blank line in it:
/*
 * my comment
 *
 * more
 */
The parser will choke and die. That's not good, so fix it.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/test/glsl_parser_test.py                | 2 +-
 unittests/framework/test/test_glsl_parser_test.py | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py
index df08672..053afde 100644
--- a/framework/test/glsl_parser_test.py
+++ b/framework/test/glsl_parser_test.py
@@ -224,7 +224,7 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest):
         for line in lines:
             # If strip renendered '' that means we had a blank newline,
             # just go on
-            if line in ['', '//']:
+            if line in ['', '//', '*']:
                 continue
             # If we get to the end of the config break
             elif is_header.match(line):
diff --git a/unittests/framework/test/test_glsl_parser_test.py b/unittests/framework/test/test_glsl_parser_test.py
index 69ad5fc..be7a4f5 100644
--- a/unittests/framework/test/test_glsl_parser_test.py
+++ b/unittests/framework/test/test_glsl_parser_test.py
@@ -216,7 +216,6 @@ def test_blank_in_config_c(tmpdir):
                             six.text_type(p), 'pass', '1.10']
 
 
- at pytest.mark.xfail
 def test_empty_in_config_c(tmpdir):
     """test.glsl_parser_test.GLSLParserTest: C style comments can have blank
     commented lines."""
-- 
2.9.0



More information about the Piglit mailing list