summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-03-26 15:21:16 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-01 14:28:11 -0700
commitfd84fca6514d8f42232f91ee063915f3eed44e22 (patch)
tree9afae65330a72201bb1752491017275c0f173d16 /framework
parent90eacf1e2a798789640d04afd07764259e6be9d9 (diff)
framework: use a class method for building test via parsing
Since the serialized tests wont need this path, build a generic constructor that this special constructor can leverage. Tested-by: Rafael Antognolli <rafael.antognolli@intel.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/test/glsl_parser_test.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py
index 6a06bc3ef..46344a8ab 100644
--- a/framework/test/glsl_parser_test.py
+++ b/framework/test/glsl_parser_test.py
@@ -272,11 +272,17 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest):
.tesc, .tese, .geom or .frag
"""
- def __init__(self, filepath):
- parsed = Parser(filepath)
+ def __init__(self, command, gl_required=set(), glsl_version=None,
+ glsl_es_version=None, **kwargs):
super(GLSLParserTest, self).__init__(
+ command, run_concurrent=True, gl_required=gl_required,
+ glsl_version=glsl_version, glsl_es_version=glsl_es_version)
+
+ @classmethod
+ def new(cls, filepath):
+ parsed = Parser(filepath)
+ return cls(
parsed.command,
- run_concurrent=True,
gl_required=parsed.gl_required,
glsl_version=parsed.glsl_version,
glsl_es_version=parsed.glsl_es_version)